aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-02 13:01:04 +0000
committerMark Mitchell <mark@codesourcery.com>1999-06-02 13:01:04 +0000
commitbf572ba0b9deeeba341d197a3412a3c0b44d819f (patch)
treeca0102a08126c8ccfea30b798468cc30711e95a7 /bfd/elflink.c
parent3fe702fddf7a4fc4eef46bcee1bcfada94e72627 (diff)
downloadgdb-bf572ba0b9deeeba341d197a3412a3c0b44d819f.zip
gdb-bf572ba0b9deeeba341d197a3412a3c0b44d819f.tar.gz
gdb-bf572ba0b9deeeba341d197a3412a3c0b44d819f.tar.bz2
* elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
may_use_rel_p, may_use_rela_p, default_use_rela_p. (bfd_elf_section_data): Add use_rela_p. * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately. (_bfd_elf_new_section_hook): Likewise. (elf_fake_sections): Use may_use_rela_p, etc., instead of use_rela_p. (_bfd_elf_copy_private_section_data): Copy use_rela_p. * elfcode.h (write_relocs): Determine whether or not use rela relocs based on the relocation section header. * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p instead of use_rela_p. * elfxx-target.h (elf_backend_may_use_relp): New macro. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. (elfNN_bed): Use them.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index dc0b042..e85f595 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -147,7 +147,8 @@ _bfd_elf_create_dynamic_sections (abfd, info)
return false;
}
- s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.plt" : ".rel.plt");
+ s = bfd_make_section (abfd,
+ bed->default_use_rela_p ? ".rela.plt" : ".rel.plt");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, ptralign))
@@ -180,7 +181,9 @@ _bfd_elf_create_dynamic_sections (abfd, info)
copy relocs. */
if (! info->shared)
{
- s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.bss" : ".rel.bss");
+ s = bfd_make_section (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.bss" : ".rel.bss"));
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, ptralign))