diff options
author | Richard Henderson <rth@redhat.com> | 2001-09-11 18:26:27 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2001-09-11 18:26:27 +0000 |
commit | 204692d7e646329022568555cf669e169cb3b517 (patch) | |
tree | 898a94734a12e408264900ecabc3d3f8049e545d /bfd | |
parent | d61a78a7afc8aff36e96a065460943aea80f39b4 (diff) | |
download | gdb-204692d7e646329022568555cf669e169cb3b517.zip gdb-204692d7e646329022568555cf669e169cb3b517.tar.gz gdb-204692d7e646329022568555cf669e169cb3b517.tar.bz2 |
* elf64-alpha.c (elf64_alpha_section_flags): New.
(elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-alpha.c | 20 |
2 files changed, 24 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 944790f..e696e8d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2001-09-11 Richard Henderson <rth@redhat.com> + * elf64-alpha.c (elf64_alpha_section_flags): New. + (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL. + +2001-09-11 Richard Henderson <rth@redhat.com> + * elf64-alpha.c (elf64_alpha_relocate_section): Do not apply HINT relocations against dynamic symbols. diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index e345b6d..2836fd5 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -74,6 +74,8 @@ static boolean elf64_alpha_object_p PARAMS((bfd *)); static boolean elf64_alpha_section_from_shdr PARAMS((bfd *, Elf64_Internal_Shdr *, char *)); +static boolean elf64_alpha_section_flags + PARAMS((flagword *, Elf64_Internal_Shdr *)); static boolean elf64_alpha_fake_sections PARAMS((bfd *, Elf64_Internal_Shdr *, asection *)); static boolean elf64_alpha_create_got_section @@ -1641,6 +1643,19 @@ elf64_alpha_section_from_shdr (abfd, hdr, name) return true; } +/* Convert Alpha specific section flags to bfd internal section flags. */ + +static boolean +elf64_alpha_section_flags (flags, hdr) + flagword *flags; + Elf64_Internal_Shdr *hdr; +{ + if (hdr->sh_flags & SHF_ALPHA_GPREL) + *flags |= SEC_SMALL_DATA; + + return true; +} + /* Set the correct type for an Alpha ELF section. We do this by the section name, which is a hack, but ought to work. */ @@ -1664,7 +1679,8 @@ elf64_alpha_fake_sections (abfd, hdr, sec) else hdr->sh_entsize = 1; } - else if (strcmp (name, ".sdata") == 0 + else if ((sec->flags & SEC_SMALL_DATA) + || strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0 || strcmp (name, ".lit4") == 0 || strcmp (name, ".lit8") == 0) @@ -4220,6 +4236,8 @@ const struct elf_size_info alpha_elf_size_info = #define elf_backend_section_from_shdr \ elf64_alpha_section_from_shdr +#define elf_backend_section_flags \ + elf64_alpha_section_flags #define elf_backend_fake_sections \ elf64_alpha_fake_sections |