.plt section. After the first relaxation pass, linker may
increase the gap between the .plt and .text sections up
to 32byte. We assume linker will always insert 32byte
- between the .plt and .text sections after the the first
+ between the .plt and .text sections after the first
relaxation pass. */
if (tsec == ia64_info->root.splt)
offset = -0x1000000 + 32;
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;
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;
/* 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;
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))
{
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))
{
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))
{
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;
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. */
if (!info->relocatable
&& (sym_sec->flags & SEC_MERGE) != 0
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
{
struct elf64_ia64_local_hash_entry *loc_h;
/* For relocs against symbols from removed linkonce sections,
or sections discarded by a linker script, we just want the
section contents zeroed. Avoid any special processing. */
- if (sym_sec != NULL && elf_discarded_section (sym_sec))
+ if (sym_sec != NULL && discarded_section (sym_sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ rel, 1, relend, howto, 0, contents);
if (info->relocatable)
continue;
}
/* Mark some specially defined symbols as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ if (h == ia64_info->root.hdynamic
|| h == ia64_info->root.hgot
|| h == ia64_info->root.hplt)
sym->st_shndx = SHN_ABS;
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);
/* ld --just-symbols and dynamic objects don't mix very well.
ld shouldn't allow it. */
if ((s = abfd->sections) != NULL
- && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+ && s->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
abort ();
/* Be sure there are dynamic sections. */