diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-07-10 04:59:42 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-07-10 04:59:42 +0000 |
commit | dc2a0abc9fe5b8e74cc9070c6253a3ee1078566d (patch) | |
tree | 4c57c2370fd1db8ccf5391d2f5f6c771f4eaeb6b /bfd/elf64-sparc.c | |
parent | f95fbb813c7ab43fefa466a2ac3e958ab5b884a8 (diff) | |
download | gdb-dc2a0abc9fe5b8e74cc9070c6253a3ee1078566d.tar.gz |
* elf.c: (assign_section_numbers) Set sh_entsize for .stab only
when not already set.
* elf64-sparc.c: (sparc64_elf_fake_sections): New function.
(elf_backend_fake_sections): Define.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r-- | bfd/elf64-sparc.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index 0ae3813f5cb..7dd51f76172 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -72,6 +72,9 @@ static void sparc64_elf_symbol_processing static boolean sparc64_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); +static boolean sparc64_elf_fake_sections + PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *)); + static const char *sparc64_elf_print_symbol_all PARAMS ((bfd *, PTR, asymbol *)); static boolean sparc64_elf_relax_section @@ -2995,6 +2998,27 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd) } return true; } + +/* MARCO: Set the correct entry size for the .stab section. */ + +static boolean +sparc64_elf_fake_sections (abfd, hdr, sec) + bfd *abfd ATTRIBUTE_UNUSED; + Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED; + asection *sec; +{ + const char *name; + + name = bfd_get_section_name (abfd, sec); + + if (strcmp (name, ".stab") == 0) + { + /* Even in the 64bit case the stab entries are only 12 bytes long. */ + elf_section_data (sec)->this_hdr.sh_entsize = 12; + } + + return true; +} /* Print a STT_REGISTER symbol to file FILE. */ @@ -3132,6 +3156,8 @@ const struct elf_size_info sparc64_elf_size_info = sparc64_elf_output_arch_syms #define bfd_elf64_bfd_merge_private_bfd_data \ sparc64_elf_merge_private_bfd_data +#define elf_backend_fake_sections \ + sparc64_elf_fake_sections #define elf_backend_size_info \ sparc64_elf_size_info |