aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ia64-vms.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-ia64-vms.c')
-rw-r--r--bfd/elf64-ia64-vms.c101
1 files changed, 52 insertions, 49 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 152ce32..ef78374 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -1270,12 +1270,13 @@ elf64_ia64_create_dynamic_sections (bfd *abfd,
flags = bed->dynamic_sec_flags;
- s = bfd_make_section_with_flags (abfd, ".dynamic", flags | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd, ".dynamic",
+ flags | SEC_READONLY);
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
- s = bfd_make_section_with_flags (abfd, ".plt", flags | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags | SEC_READONLY);
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return FALSE;
@@ -1287,32 +1288,32 @@ elf64_ia64_create_dynamic_sections (bfd *abfd,
if (!get_pltoff (abfd, ia64_info))
return FALSE;
- s = bfd_make_section_with_flags (abfd, ".vmsdynstr",
- (SEC_ALLOC
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_anyway_with_flags (abfd, ".vmsdynstr",
+ (SEC_ALLOC
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 0))
return FALSE;
/* Create a fixup section. */
- s = bfd_make_section_with_flags (abfd, ".fixups",
- (SEC_ALLOC
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_anyway_with_flags (abfd, ".fixups",
+ (SEC_ALLOC
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
ia64_info->fixups_sec = s;
/* Create the transfer fixup section. */
- s = bfd_make_section_with_flags (abfd, ".transfer",
- (SEC_ALLOC
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_anyway_with_flags (abfd, ".transfer",
+ (SEC_ALLOC
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
@@ -1721,7 +1722,8 @@ get_got (bfd *abfd, struct elf64_ia64_link_hash_table *ia64_info)
/* The .got section is always aligned at 8 bytes. */
flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
- got = bfd_make_section_with_flags (dynobj, ".got", flags | SEC_SMALL_DATA);
+ got = bfd_make_section_anyway_with_flags (dynobj, ".got",
+ flags | SEC_SMALL_DATA);
if (got == NULL
|| !bfd_set_section_alignment (dynobj, got, 3))
return NULL;
@@ -1750,13 +1752,14 @@ get_fptr (bfd *abfd, struct bfd_link_info *info,
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
- fptr = bfd_make_section_with_flags (dynobj, ".opd",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | (info->pie ? 0 : SEC_READONLY)
- | SEC_LINKER_CREATED));
+ fptr = bfd_make_section_anyway_with_flags (dynobj, ".opd",
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | (info->pie ? 0
+ : SEC_READONLY)
+ | SEC_LINKER_CREATED));
if (!fptr
|| !bfd_set_section_alignment (dynobj, fptr, 4))
{
@@ -1769,12 +1772,12 @@ get_fptr (bfd *abfd, struct bfd_link_info *info,
if (info->pie)
{
asection *fptr_rel;
- fptr_rel = bfd_make_section_with_flags (dynobj, ".rela.opd",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
+ fptr_rel = bfd_make_section_anyway_with_flags (dynobj, ".rela.opd",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (fptr_rel == NULL
|| !bfd_set_section_alignment (dynobj, fptr_rel, 3))
{
@@ -1802,14 +1805,14 @@ get_pltoff (bfd *abfd, struct elf64_ia64_link_hash_table *ia64_info)
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
- pltoff = bfd_make_section_with_flags (dynobj,
- ELF_STRING_ia64_pltoff,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_SMALL_DATA
- | SEC_LINKER_CREATED));
+ pltoff = bfd_make_section_anyway_with_flags (dynobj,
+ ELF_STRING_ia64_pltoff,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_SMALL_DATA
+ | SEC_LINKER_CREATED));
if (!pltoff
|| !bfd_set_section_alignment (dynobj, pltoff, 4))
{
@@ -1849,15 +1852,15 @@ get_reloc_section (bfd *abfd,
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
- srel = bfd_get_section_by_name (dynobj, srel_name);
+ srel = bfd_get_linker_section (dynobj, srel_name);
if (srel == NULL && create)
{
- srel = bfd_make_section_with_flags (dynobj, srel_name,
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
+ srel = bfd_make_section_anyway_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_alignment (dynobj, srel, 3))
return NULL;
@@ -2773,11 +2776,11 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
unsigned int time_hi, time_lo;
/* The .dynamic section must exist and be empty. */
- dynsec = bfd_get_section_by_name (hash_table->dynobj, ".dynamic");
+ dynsec = bfd_get_linker_section (hash_table->dynobj, ".dynamic");
BFD_ASSERT (dynsec != NULL);
BFD_ASSERT (dynsec->size == 0);
- dynstrsec = bfd_get_section_by_name (hash_table->dynobj, ".vmsdynstr");
+ dynstrsec = bfd_get_linker_section (hash_table->dynobj, ".vmsdynstr");
BFD_ASSERT (dynstrsec != NULL);
BFD_ASSERT (dynstrsec->size == 0);
dynstrsec->size = 1; /* Initial blank. */
@@ -4061,7 +4064,7 @@ elf64_ia64_finish_dynamic_sections (bfd *abfd,
unsigned int unwind_seg = 0;
unsigned int code_seg = 0;
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+ sdyn = bfd_get_linker_section (dynobj, ".dynamic");
BFD_ASSERT (sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);