free (tmp_name);
if (bfd_link_pic (link_info)
- || globals->root.is_relocatable_executable
|| globals->pic_veneer)
size = ARM2THUMB_PIC_GLUE_SIZE;
else if (globals->use_blx)
myh->root.u.def.value = my_offset;
if (bfd_link_pic (info)
- || globals->root.is_relocatable_executable
|| globals->pic_veneer)
{
/* For relocatable objects we can't use absolute addresses,
rel->r_addend);
}
- /* When generating a shared object or relocatable executable, these
- relocations are copied into the output file to be resolved at
- run time. */
+ /* When generating a shared library or PIE, these relocations
+ are copied into the output file to be resolved at run time. */
if ((bfd_link_pic (info)
- || globals->root.is_relocatable_executable
|| globals->fdpic_p)
&& (input_section->flags & SEC_ALLOC)
&& !(globals->root.target_os == is_vxworks
sreloc = NULL;
- /* Create dynamic sections for relocatable executables so that we can
- copy relocations. */
- if (htab->root.is_relocatable_executable
- && ! htab->root.dynamic_sections_created)
- {
- if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
- return false;
- }
-
if (htab->root.dynobj == NULL)
htab->root.dynobj = abfd;
if (!create_ifunc_sections (info))
case R_ARM_THM_MOVT_PREL:
/* Should the interworking branches be listed here? */
- if ((bfd_link_pic (info) || htab->root.is_relocatable_executable
+ if ((bfd_link_pic (info)
|| htab->fdpic_p)
&& (sec->flags & SEC_ALLOC) != 0)
{
/* If we are creating a shared library, we must presume that the
only references to the symbol are via the global offset table.
For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. Relocatable executables
- can reference data in shared objects directly, so we don't need to
- do anything here. */
- if (bfd_link_pic (info) || globals->root.is_relocatable_executable)
+ be handled correctly by relocate_section. */
+ if (bfd_link_pic (info))
return true;
/* We must allocate the symbol in our .dynbss section, which will
visibility changes. */
if (bfd_link_pic (info)
- || htab->root.is_relocatable_executable
|| htab->fdpic_p)
{
/* Relocs that use pc_count are PC-relative forms, which will appear
return false;
}
}
-
- else if (htab->root.is_relocatable_executable && h->dynindx == -1
- && h->root.type == bfd_link_hash_new)
- {
- /* Output absolute symbols so that we can create relocations
- against them. For normal symbols we output a relocation
- against the section that contains them. */
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return false;
- }
-
}
else
{
osi.sec_shndx = _bfd_elf_section_from_bfd_section
(output_bfd, osi.sec->output_section);
- if (bfd_link_pic (info) || htab->root.is_relocatable_executable
+ if (bfd_link_pic (info)
|| htab->pic_veneer)
size = ARM2THUMB_PIC_GLUE_SIZE;
else if (htab->use_blx)
case BFD_RELOC_AARCH64_NN:
- /* When generating a shared object or relocatable executable, these
- relocations are copied into the output file to be resolved at
- run time. */
- if (((bfd_link_pic (info)
- || globals->root.is_relocatable_executable)
+ /* When generating a shared library or PIE, these relocations
+ are copied into the output file to be resolved at run time. */
+ if ((bfd_link_pic (info)
&& (input_section->flags & SEC_ALLOC)
&& (h == NULL
|| (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
case BFD_RELOC_KVX_S64_LO10:
case BFD_RELOC_KVX_S64_UP27:
case BFD_RELOC_KVX_S64_EX27:
- /* When generating a shared object or relocatable executable, these
- relocations are copied into the output file to be resolved at
- run time. */
- if (((bfd_link_pic (info) == true)
- || globals->root.is_relocatable_executable)
+ /* When generating a shared library or PIE, these relocations
+ are copied into the output file to be resolved at run time. */
+ if (bfd_link_pic (info)
&& (input_section->flags & SEC_ALLOC)
&& (h == NULL
|| (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT