@ -117,20 +117,13 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
can do the right thing for ST_ENTRY vs ST_CODE symbols ) .
can do the right thing for ST_ENTRY vs ST_CODE symbols ) .
There ' s nothing in the header which easily allows us to do
There ' s nothing in the header which easily allows us to do
this . The only reliable way I know of is to check for the
this .
existence of a $ SHLIB_INFO $ section with a non - zero size . */
/* The code below is not a reliable way to check whether an
This code used to rely upon the existence of a $ SHLIB_INFO $
* executable is dynamic , so I commented it out - RT
section to make this determination . HP claims that it is
* shlib_info = bfd_get_section_by_name ( objfile - > obfd , " $SHLIB_INFO$ " ) ;
more accurate to check for a nonzero text offset , but they
* if ( shlib_info )
have not provided any information about why that test is
* dynamic = ( bfd_section_size ( objfile - > obfd , shlib_info ) ! = 0 ) ;
more accurate . */
* else
* dynamic = 0 ;
*/
/* I replaced the code with a simple check for text offset not being
* zero . Still not 100 % reliable , but a more reliable way of asking
* " is this a dynamic executable? " than the above . RT
*/
dynamic = ( text_offset ! = 0 ) ;
dynamic = ( text_offset ! = 0 ) ;
endbufp = buf + number_of_symbols ;
endbufp = buf + number_of_symbols ;
@ -240,13 +233,11 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
case ST_ENTRY :
case ST_ENTRY :
symname = bufp - > name . n_strx + stringtab ;
symname = bufp - > name . n_strx + stringtab ;
/* For a dynamic executable, ST_ENTRY symbols are
/* SS_LOCAL symbols in a shared library do not have
the stubs , while the ST_CODE symbol is the real
export stubs , so we do not have to worry about
function . */
using mst_file_text vs mst_solib_trampoline here like
if ( dynamic )
we do for SS_UNIVERSAL and SS_EXTERNAL symbols above . */
ms_type = mst_solib_trampoline ;
ms_type = mst_file_text ;
else
ms_type = mst_file_text ;
bufp - > symbol_value + = text_offset ;
bufp - > symbol_value + = text_offset ;
bufp - > symbol_value = SMASH_TEXT_ADDRESS ( bufp - > symbol_value ) ;
bufp - > symbol_value = SMASH_TEXT_ADDRESS ( bufp - > symbol_value ) ;
break ;
break ;