aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-bfin.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-bfin.c')
-rw-r--r--bfd/elf32-bfin.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index d73bfda..6efee04 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1601,7 +1601,7 @@ bfin_relocate_section (bfd * output_bfd,
if (name == NULL)
return FALSE;
if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
if (r == bfd_reloc_overflow)
@@ -2560,7 +2560,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
- name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+ name = name == NULL ? bfd_section_name (sec) : name;
}
else
{
@@ -2778,8 +2778,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
bfd_vma offset;
addend += bfinfdpic_got_section (info)->output_section->vma;
- if ((bfd_get_section_flags (output_bfd,
- input_section->output_section)
+ if ((bfd_section_flags (input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
if (_bfinfdpic_osec_readonly_p (output_bfd,
@@ -2807,8 +2806,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
picrel);
}
}
- else if ((bfd_get_section_flags (output_bfd,
- input_section->output_section)
+ else if ((bfd_section_flags (input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
bfd_vma offset;
@@ -2901,8 +2899,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
if (osec)
addend += osec->output_section->vma;
if (IS_FDPIC (input_bfd)
- && (bfd_get_section_flags (output_bfd,
- input_section->output_section)
+ && (bfd_section_flags (input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
if (_bfinfdpic_osec_readonly_p (output_bfd,
@@ -2939,8 +2936,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
}
else
{
- if ((bfd_get_section_flags (output_bfd,
- input_section->output_section)
+ if ((bfd_section_flags (input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
if (_bfinfdpic_osec_readonly_p (output_bfd,
@@ -3201,7 +3197,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
elf_hash_table (info)->sgot = s;
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, ptralign))
+ || !bfd_set_section_alignment (s, ptralign))
return FALSE;
if (bed->want_got_sym)
@@ -3238,7 +3234,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
s = bfd_make_section_anyway_with_flags (abfd, ".rel.got",
(flags | SEC_READONLY));
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || !bfd_set_section_alignment (s, 2))
return FALSE;
bfinfdpic_gotrel_section (info) = s;
@@ -3247,7 +3243,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
s = bfd_make_section_anyway_with_flags (abfd, ".rofixup",
(flags | SEC_READONLY));
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || !bfd_set_section_alignment (s, 2))
return FALSE;
bfinfdpic_gotfixup_section (info) = s;
@@ -3261,7 +3257,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+ || !bfd_set_section_alignment (s, bed->plt_alignment))
return FALSE;
/* Blackfin-specific: remember it. */
bfinfdpic_plt_section (info) = s;
@@ -3289,7 +3285,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
s = bfd_make_section_anyway_with_flags (abfd, ".rel.plt",
flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
/* Blackfin-specific: remember it. */
bfinfdpic_pltrel_section (info) = s;
@@ -3355,7 +3351,7 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
".rela.bss",
flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
}
}
@@ -4616,7 +4612,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_BFIN_FUNCDESC_VALUE:
picrel->relocsfdv++;
- if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
+ if (bfd_section_flags (sec) & SEC_ALLOC)
picrel->relocs32--;
/* Fall through. */
@@ -4625,7 +4621,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
picrel->sym++;
- if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
+ if (bfd_section_flags (sec) & SEC_ALLOC)
picrel->relocs32++;
break;
@@ -5064,9 +5060,9 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
+ if (power_of_two > bfd_section_alignment (s))
{
- if (!bfd_set_section_alignment (dynobj, s, power_of_two))
+ if (!bfd_set_section_alignment (s, power_of_two))
return FALSE;
}
@@ -5200,7 +5196,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
+ name = bfd_section_name (s);
strip = FALSE;