aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-07-06 02:22:00 +0000
committerKen Raeburn <raeburn@cygnus>1995-07-06 02:22:00 +0000
commitede4eed4838610aaaf1e43571638036ca3819c64 (patch)
treef959dbd6fbb60e94b3ef82eb74fa2fcfc2da0865 /bfd/elf32-hppa.c
parent80c5739dbe40e1eac02aaf85fa63711c29571a2b (diff)
downloadgdb-ede4eed4838610aaaf1e43571638036ca3819c64.zip
gdb-ede4eed4838610aaaf1e43571638036ca3819c64.tar.gz
gdb-ede4eed4838610aaaf1e43571638036ca3819c64.tar.bz2
Added new files elflink.c, elflink.h, elfcore.h.
Moved some mostly size-independent stuff from elfcode.h to elf.c, adding a data structure to elfcode.h with some misc data and callback functions. Added a pointer to that structure to the target back end data. More work can be done here. Renamed generic elf routines (not cpu-specific stuff) to start with bfd_elf or _bfd_elf. Updated most call sites, sometimes defined some macros. Moved some dynamic linking support code from m68k, sparc, i386 to common files, using target back end flags to control behavior. More work can probably be done here too. Moved core- and linker-support code out of elfcode.h to elf.c, elfcore.h, elflink.h, or elflink.c. Now elfcode.h contains only .o and executable support, plus #includes of elfcore.h and elflink.h. Much of the contents of these other header files can probably still be moved from the .h files to the .c files, to get compiled only once. Cleaned up some "gcc -Wall" warnings regarding unused or uninitialized variables, in generic and cpu-specific code.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index e2aa73e..0e92f4e 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -865,9 +865,9 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
sym_name = h->root.root.string;
else
{
- sym_name = elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
+ sym_name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
if (sym_name == NULL)
return false;
if (*sym_name == '\0')
@@ -1167,8 +1167,8 @@ elf32_hppa_set_section_contents (abfd, section, location, offset, count)
if (!strcmp (section->name, ".PARISC.symextn") && !symext_chain_size)
return true;
else
- return bfd_elf32_set_section_contents (abfd, section, location,
- offset, count);
+ return _bfd_elf_set_section_contents (abfd, section, location,
+ offset, count);
}
/* Translate from an elf into field into a howto relocation pointer. */
@@ -2007,7 +2007,7 @@ elf32_hppa_read_symext_info (input_bfd, symtab_hdr, args_hash_table, local_syms)
hdr = elf_elfsections (input_bfd)[local_syms[current_index].st_shndx];
sym_sec = hdr->bfd_section;
- sym_name = elf_string_from_elf_section (input_bfd,
+ sym_name = bfd_elf_string_from_elf_section (input_bfd,
symtab_hdr->sh_link,
local_syms[current_index].st_name);
len = strlen (sym_name) + 10;
@@ -2529,7 +2529,7 @@ elf32_hppa_size_stubs (stub_bfd, output_bfd, link_info)
struct bfd_link_info *link_info;
{
bfd *input_bfd;
- asection *section, *stub_sec;
+ asection *section, *stub_sec = 0;
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Sym *local_syms, *isym, **all_local_syms;
Elf32_External_Sym *ext_syms, *esym;
@@ -2803,9 +2803,9 @@ elf32_hppa_size_stubs (stub_bfd, output_bfd, link_info)
sym = local_syms + r_index;
hdr = elf_elfsections (input_bfd)[sym->st_shndx];
sym_sec = hdr->bfd_section;
- sym_name = elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
+ sym_name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
sym_value = (ELF_ST_TYPE (sym->st_info) == STT_SECTION
? 0 : sym->st_value);
destination = (sym_value