aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-05-25 20:21:06 +0000
committerKen Raeburn <raeburn@cygnus>1993-05-25 20:21:06 +0000
commit2084a17668fd29203e5c53577e18f105c80aa21a (patch)
tree012ab363428f2599f330f956189d364e7d0c7356 /gdb/elfread.c
parent51300bdb0b9edd894138c3a10d98e3c4528a516d (diff)
downloadgdb-2084a17668fd29203e5c53577e18f105c80aa21a.zip
gdb-2084a17668fd29203e5c53577e18f105c80aa21a.tar.gz
gdb-2084a17668fd29203e5c53577e18f105c80aa21a.tar.bz2
* elfread.c (elf_symfile_read): Update ELF structure and routine
names to specify 32-bit versions. (elf_symtab_read): Retrieve size field directly from symbol, instead of using old kludge.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index eebd0e3..a0345f8 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -33,11 +33,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
************************************************************************/
#include "defs.h"
-#include "elf/common.h"
-#include "elf/external.h"
-#include "elf/internal.h"
#include "bfd.h"
#include "libbfd.h" /* For bfd_elf_find_section */
+#include "libelf.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
@@ -283,8 +281,12 @@ elf_symtab_read (abfd, addr, objfile)
continue; /* Skip this symbol. */
}
/* Pass symbol size field in via BFD. FIXME!!! */
- record_minimal_symbol_and_info ((char *) sym -> name,
- symaddr, ms_type, sym->udata, objfile);
+ {
+ elf32_symbol_type *esym = (elf32_symbol_type *) sym;
+ unsigned long size = esym->internal_elf_sym.st_size;
+ record_minimal_symbol_and_info ((char *) sym -> name, symaddr,
+ ms_type, (PTR) size, objfile);
+ }
}
/* See if this is a debugging symbol that helps Solaris
@@ -436,9 +438,9 @@ elf_symfile_read (objfile, section_offsets, mainline)
sections visible to the caller. So we have to search the
ELF section table, not the BFD section table, for the string
table. */
- struct elf_internal_shdr *elf_sect;
+ struct elf32_internal_shdr *elf_sect;
- elf_sect = bfd_elf_find_section (abfd, ".stabstr");
+ elf_sect = bfd_elf32_find_section (abfd, ".stabstr");
if (elf_sect)
elfstab_build_psymtabs (objfile,
section_offsets,