aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ia64.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2000-10-05 22:22:27 +0000
committerJim Wilson <wilson@tuliptree.org>2000-10-05 22:22:27 +0000
commitfa152c49304b325b423b55f8be8f00855fe9ed26 (patch)
tree162d7cbd9fac38d2d7bc496f508cf78af04b342a /bfd/elf64-ia64.c
parentafa680f89a3834ec51fe371a7819b1247b6308b3 (diff)
downloadgdb-fa152c49304b325b423b55f8be8f00855fe9ed26.zip
gdb-fa152c49304b325b423b55f8be8f00855fe9ed26.tar.gz
gdb-fa152c49304b325b423b55f8be8f00855fe9ed26.tar.bz2
Preserve machine dependent section header flags when reading ELF object file.
* elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags field. * elf.c (_bfd_elf_make_section_from_shdr): Call the elf_backend_section_flags function. * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion code. (elf64_ia64_section_flags): New function containing flag conversion code. (elf_backend_section_flags): Define to elf64_ia64_section_flags. * elfxx-target.h (elf_backend_section_flags): Define. (elfNN_bed): Initialize elf_backend_section_flags field.
Diffstat (limited to 'bfd/elf64-ia64.c')
-rw-r--r--bfd/elf64-ia64.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/bfd/elf64-ia64.c b/bfd/elf64-ia64.c
index f1ea331..cc63838 100644
--- a/bfd/elf64-ia64.c
+++ b/bfd/elf64-ia64.c
@@ -946,8 +946,21 @@ elf64_ia64_section_from_shdr (abfd, hdr, name)
return false;
newsect = hdr->bfd_section;
+ return true;
+}
+
+/* Convert IA-64 specific section flags to bfd internal section flags. */
+
+/* ??? There is no bfd internal flag equivalent to the SHF_IA_64_NORECOV
+ flag. */
+
+static boolean
+elf64_ia64_section_flags (flags, hdr)
+ flagword *flags;
+ Elf64_Internal_Shdr *hdr;
+{
if (hdr->sh_flags & SHF_IA_64_SHORT)
- newsect->flags |= SEC_SMALL_DATA;
+ *flags |= SEC_SMALL_DATA;
return true;
}
@@ -4064,6 +4077,8 @@ elf64_ia64_print_private_bfd_data (abfd, ptr)
#define elf_backend_section_from_shdr \
elf64_ia64_section_from_shdr
+#define elf_backend_section_flags \
+ elf64_ia64_section_flags
#define elf_backend_fake_sections \
elf64_ia64_fake_sections
#define elf_backend_add_symbol_hook \