}
}
- if (htab->is_vxworks && !bfd_link_pic (info))
+ if (htab->target_os == is_vxworks && !bfd_link_pic (info))
{
/* VxWorks has a second set of relocations for each PLT entry
in executables. They go in a separate relocation section,
}
}
- if (htab->is_vxworks)
+ if (htab->target_os == is_vxworks)
{
struct elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
}
}
ret->target_id = bed->target_id;
+ ret->target_os = get_elf_x86_backend_data (abfd)->target_os;
ret->loc_hash_table = htab_try_create (1024,
_bfd_x86_elf_local_htab_hash,
linker script /DISCARD/, so we'll be discarding
the relocs too. */
}
- else if (htab->is_vxworks
+ else if (htab->target_os == is_vxworks
&& strcmp (p->sec->output_section->name,
".tls_vars") == 0)
{
return FALSE;
}
}
- if (htab->is_vxworks
+ if (htab->target_os == is_vxworks
&& !elf_vxworks_add_dynamic_entries (output_bfd, info))
return FALSE;
}
switch (dyn.d_tag)
{
default:
- if (htab->is_vxworks
+ if (htab->target_os == is_vxworks
&& elf_vxworks_finish_dynamic_entry (output_bfd, &dyn))
break;
continue;
if (ELIMINATE_COPY_RELOCS
&& (bed->target_id == X86_64_ELF_DATA
|| (!eh->gotoff_ref
- && !htab->is_vxworks)))
+ && htab->target_os != is_vxworks)))
{
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
if (htab == NULL)
return pbfd;
- htab->is_vxworks = init_table->is_vxworks;
htab->r_info = init_table->r_info;
htab->r_sym = init_table->r_sym;
if (bfd_link_relocatable (info))
return pbfd;
+ htab->plt0_pad_byte = init_table->plt0_pad_byte;
+
use_ibt_plt = info->ibtplt || info->ibt;
if (!use_ibt_plt && pbfd != NULL)
{
}
}
+ /* Return if there are no normal input files. */
+ if (dynobj == NULL)
+ return pbfd;
+
/* Even when lazy binding is disabled by "-z now", the PLT0 entry may
still be used with LD_AUDIT or LD_PROFILE if PLT entry is used for
canonical function address. */
htab->plt.has_plt0 = 1;
- normal_target = init_table->normal_target;
+ normal_target = htab->target_os == is_normal;
if (normal_target)
{
htab->plt.eh_frame_plt = htab->lazy_plt->eh_frame_plt;
}
- /* Return if there are no normal input files. */
- if (dynobj == NULL)
- return pbfd;
-
- if (htab->is_vxworks
+ if (htab->target_os == is_vxworks
&& !elf_vxworks_create_dynamic_sections (dynobj, info,
&htab->srelplt2))
{