diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-05-05 14:34:04 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-05-05 14:34:04 +0000 |
commit | 3496cb2af49b7fdc1ea5a085b87e1a6c0b26aea4 (patch) | |
tree | 49c12477c14e4a8b97684223e93e1a4521b199ec /bfd/elf64-hppa.c | |
parent | 59fef9e758221469b7aeb82dacca01282c04baf9 (diff) | |
download | gdb-3496cb2af49b7fdc1ea5a085b87e1a6c0b26aea4.zip gdb-3496cb2af49b7fdc1ea5a085b87e1a6c0b26aea4.tar.gz gdb-3496cb2af49b7fdc1ea5a085b87e1a6c0b26aea4.tar.bz2 |
2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
* section.c (bfd_make_section_anyway_with_flags): New.
(bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
(bfd_make_section_with_flags): New.
(bfd_make_section): Call bfd_make_section_with_flags.
* elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
instead of bfd_make_section/bfd_make_section and don't call
bfd_set_section_flags.
(mn10300_elf_check_relocs): Likewise.
(_bfd_mn10300_elf_create_dynamic_sections): Likewise.
* elf32-arm.c (create_got_section): Likewise.
(bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
(elf32_arm_check_relocs): Likewise.
* elf32-cris.c (cris_elf_check_relocs): Likewise.
* elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
(_frv_create_got_section): Likewise.
(elf32_frvfdpic_create_dynamic_sections): Likewise.
* elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
(elf32_hppa_check_relocs): Likewise.
* elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
(i370_elf_check_relocs): Likewise.
* elf32-i386.c (create_got_section): Likewise.
(elf_i386_check_relocs): Likewise.
* elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
(create_got_section): Likewise.
(m32r_elf_create_dynamic_sections): Likewise.
(m32r_elf_check_relocs): Likewise.
* elf32-m68k.c (elf_m68k_check_relocs): Likewise.
* elf32-ppc.c (ppc_elf_create_got): Likewise.
(ppc_elf_create_dynamic_sections): Likewise.
(ppc_elf_add_symbol_hook): Likewise.
(ppc_elf_check_relocs): Likewise.
* elf32-s390.c (create_got_section): Likewise.
(elf_s390_check_relocs): Likewise.
* elf32-sh.c (create_got_section): Likewise.
(sh_elf_create_dynamic_sections): Likewise.
(sh_elf_check_relocs): Likewise.
* elf32-vax.c (elf_vax_check_relocs): Likewise.
* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
(add_extra_plt_sections): Likewise.
* elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
(elf64_alpha_create_got_section): Likewise.
(elf64_alpha_create_dynamic_sections): Likewise.
(elf64_alpha_check_relocs): Likewise.
* elf64-hppa.c (get_reloc_section): Likewise.
(get_opd): Likewise.
(get_plt): Likewise.
(get_dlt): Likewise.
(get_stub): Likewise.
(elf64_hppa_create_dynamic_sectionso): Likewise.
* elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
* elf64-ppc.c (create_linkage_sections): Likewise.
(ppc64_elf_check_relocs): Likewise.
* elf64-s390.c (create_got_section): Likewise.
(elf_s390_check_relocs): Likewise.
* elf64-sh64.c (sh_elf64_check_relocs): Likewise.
(sh64_elf64_create_dynamic_sections): Likewise.
* elf64-x86-64.c (create_got_section): Likewise.
(elf64_x86_64_check_relocs): Likewise.
* elflink.c (_bfd_elf_create_got_section): Likewise.
(_bfd_elf_link_create_dynamic_sections): Likewise.
(elf_link_add_object_symbols): Likewise.
* elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
(elfNN_ia64_create_dynamic_sections): Likewise.
(get_fptr): Likewise.
(get_pltoff): Likewise.
(get_reloc_section): Likewise.
(elfNN_ia64_object_p): Likewise.
* elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
(mips_elf_create_compact_rel_section): Likewise.
(mips_elf_create_got_section): Likewise.
(_bfd_mips_elf_create_dynamic_sections): Likewise.
* elfxx-sparc.c (create_got_section): Likewise.
(_bfd_sparc_elf_check_relocs): Likewise.
* elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
on linker created sections.
Diffstat (limited to 'bfd/elf64-hppa.c')
-rw-r--r-- | bfd/elf64-hppa.c | 116 |
1 files changed, 55 insertions, 61 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index d78442b..1ca533b 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -532,15 +532,14 @@ get_reloc_section (abfd, hppa_info, sec) srel = bfd_get_section_by_name (dynobj, srel_name); if (srel == NULL) { - srel = bfd_make_section (dynobj, srel_name); + srel = bfd_make_section_with_flags (dynobj, srel_name, + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED + | SEC_READONLY)); if (srel == NULL - || !bfd_set_section_flags (dynobj, srel, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)) || !bfd_set_section_alignment (dynobj, srel, 3)) return FALSE; } @@ -1232,14 +1231,13 @@ get_opd (abfd, info, hppa_info) if (!dynobj) hppa_info->root.dynobj = dynobj = abfd; - opd = bfd_make_section (dynobj, ".opd"); + opd = bfd_make_section_with_flags (dynobj, ".opd", + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED)); if (!opd - || !bfd_set_section_flags (dynobj, opd, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, opd, 3)) { BFD_ASSERT (0); @@ -1270,14 +1268,13 @@ get_plt (abfd, info, hppa_info) if (!dynobj) hppa_info->root.dynobj = dynobj = abfd; - plt = bfd_make_section (dynobj, ".plt"); + plt = bfd_make_section_with_flags (dynobj, ".plt", + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED)); if (!plt - || !bfd_set_section_flags (dynobj, plt, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, plt, 3)) { BFD_ASSERT (0); @@ -1308,14 +1305,13 @@ get_dlt (abfd, info, hppa_info) if (!dynobj) hppa_info->root.dynobj = dynobj = abfd; - dlt = bfd_make_section (dynobj, ".dlt"); + dlt = bfd_make_section_with_flags (dynobj, ".dlt", + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED)); if (!dlt - || !bfd_set_section_flags (dynobj, dlt, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, dlt, 3)) { BFD_ASSERT (0); @@ -1346,15 +1342,13 @@ get_stub (abfd, info, hppa_info) if (!dynobj) hppa_info->root.dynobj = dynobj = abfd; - stub = bfd_make_section (dynobj, ".stub"); + stub = bfd_make_section_with_flags (dynobj, ".stub", + (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_READONLY + | SEC_LINKER_CREATED)); if (!stub - || !bfd_set_section_flags (dynobj, stub, - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_READONLY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, stub, 3)) { BFD_ASSERT (0); @@ -1424,46 +1418,46 @@ elf64_hppa_create_dynamic_sections (abfd, info) if (! get_opd (abfd, info, elf64_hppa_hash_table (info))) return FALSE; - s = bfd_make_section(abfd, ".rela.dlt"); + s = bfd_make_section_with_flags (abfd, ".rela.dlt", + (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_READONLY + | SEC_LINKER_CREATED)); if (s == NULL - || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_READONLY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; elf64_hppa_hash_table (info)->dlt_rel_sec = s; - s = bfd_make_section(abfd, ".rela.plt"); + s = bfd_make_section_with_flags (abfd, ".rela.plt", + (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_READONLY + | SEC_LINKER_CREATED)); if (s == NULL - || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_READONLY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; elf64_hppa_hash_table (info)->plt_rel_sec = s; - s = bfd_make_section(abfd, ".rela.data"); + s = bfd_make_section_with_flags (abfd, ".rela.data", + (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_READONLY + | SEC_LINKER_CREATED)); if (s == NULL - || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_READONLY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; elf64_hppa_hash_table (info)->other_rel_sec = s; - s = bfd_make_section(abfd, ".rela.opd"); + s = bfd_make_section_with_flags (abfd, ".rela.opd", + (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_READONLY + | SEC_LINKER_CREATED)); if (s == NULL - || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_READONLY - | SEC_LINKER_CREATED)) || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; elf64_hppa_hash_table (info)->opd_rel_sec = s; |