aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-i370.c')
-rw-r--r--bfd/elf32-i370.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 6e6c8e8..7fba4d1 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -433,7 +433,7 @@ i370_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (s == NULL)
return FALSE;
- if (! info->shared)
+ if (! bfd_link_pic (info))
{
s = bfd_make_section_anyway_with_flags (abfd, ".rela.sbss",
flags | SEC_READONLY);
@@ -503,7 +503,7 @@ i370_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
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. */
- if (info->shared)
+ if (bfd_link_pic (info))
return TRUE;
/* We must allocate the symbol in our .dynbss section, which will
@@ -594,7 +594,7 @@ i370_elf_size_dynamic_sections (bfd *output_bfd,
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (info->executable)
+ if (bfd_link_executable (info))
{
s = bfd_get_linker_section (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -713,7 +713,7 @@ i370_elf_size_dynamic_sections (bfd *output_bfd,
#define add_dynamic_entry(TAG, VAL) \
_bfd_elf_add_dynamic_entry (info, TAG, VAL)
- if (!info->shared)
+ if (!bfd_link_pic (info))
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
@@ -755,7 +755,7 @@ i370_elf_size_dynamic_sections (bfd *output_bfd,
locations in linker-created sections that do not have
externally-visible names. Instead, we should work out precisely
which sections relocations are targeted at. */
- if (info->shared)
+ if (bfd_link_pic (info))
{
int c;
@@ -804,7 +804,7 @@ i370_elf_check_relocs (bfd *abfd,
const Elf_Internal_Rela *rel_end;
asection *sreloc;
- if (info->relocatable)
+ if (bfd_link_relocatable (info))
return TRUE;
#ifdef DEBUG
@@ -839,7 +839,7 @@ i370_elf_check_relocs (bfd *abfd,
h->root.non_ir_ref = 1;
}
- if (info->shared)
+ if (bfd_link_pic (info))
{
#ifdef DEBUG
fprintf (stderr,
@@ -948,7 +948,7 @@ i370_elf_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
}
- if (info->shared)
+ if (bfd_link_pic (info))
{
asection *sdynsym;
asection *s;
@@ -1049,7 +1049,7 @@ i370_elf_relocate_section (bfd *output_bfd,
_bfd_error_handler ("i370_elf_relocate_section called for %B section %A, %ld relocations%s",
input_bfd, input_section,
(long) input_section->reloc_count,
- (info->relocatable) ? " (relocatable)" : "");
+ (bfd_link_relocatable (info)) ? " (relocatable)" : "");
#endif
if (!i370_elf_howto_table[ R_I370_ADDR31 ])
@@ -1113,7 +1113,7 @@ i370_elf_relocate_section (bfd *output_bfd,
|| h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
- if (info->shared
+ if (bfd_link_pic (info)
&& ((! info->symbolic && h->dynindx != -1)
|| !h->def_regular)
&& (input_section->flags & SEC_ALLOC) != 0
@@ -1135,7 +1135,7 @@ i370_elf_relocate_section (bfd *output_bfd,
else if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
;
- else if (!info->relocatable)
+ else if (!bfd_link_relocatable (info))
{
if ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
@@ -1153,7 +1153,7 @@ i370_elf_relocate_section (bfd *output_bfd,
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
rel, 1, relend, howto, 0, contents);
- if (info->relocatable)
+ if (bfd_link_relocatable (info))
continue;
switch ((int) r_type)
@@ -1184,7 +1184,7 @@ i370_elf_relocate_section (bfd *output_bfd,
object. */
case (int) R_I370_ADDR31:
case (int) R_I370_ADDR16:
- if (info->shared
+ if (bfd_link_pic (info)
&& r_symndx != STN_UNDEF)
{
Elf_Internal_Rela outrel;