From cedb70c5450013a9c0f7d25564b63c4394b74ea1 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 3 Jun 2002 01:57:10 +0000 Subject: [PATCH] * elf32-arc.c: Fix formatting. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-dlx.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-i386qnx.c: Likewise. * elf32-or32.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh64.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. --- bfd/ChangeLog | 21 ++++++++++++++++ bfd/elf32-arc.c | 2 +- bfd/elf32-arm.h | 10 ++++---- bfd/elf32-cris.c | 2 +- bfd/elf32-dlx.c | 2 +- bfd/elf32-hppa.c | 2 +- bfd/elf32-i386.c | 8 +++---- bfd/elf32-i386qnx.c | 6 ++--- bfd/elf32-or32.c | 20 ++++++++-------- bfd/elf32-s390.c | 2 +- bfd/elf32-sh64.c | 2 +- bfd/elf32-vax.c | 10 ++++---- bfd/elf32-xstormy16.c | 56 +++++++++++++++++++++---------------------- bfd/elf64-alpha.c | 12 +++++----- bfd/elf64-mmix.c | 2 +- bfd/elf64-ppc.c | 30 +++++++++++------------ bfd/elf64-s390.c | 2 +- bfd/elf64-sh64.c | 20 ++++++++-------- bfd/elf64-x86-64.c | 10 ++++---- 19 files changed, 120 insertions(+), 99 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b768b0d5bf..5f022498f0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,24 @@ +2002-06-02 Kazu Hirata + + * elf32-arc.c: Fix formatting. + * elf32-arm.h: Likewise. + * elf32-cris.c: Likewise. + * elf32-dlx.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-i386qnx.c: Likewise. + * elf32-or32.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh64.c: Likewise. + * elf32-vax.c: Likewise. + * elf32-xstormy16.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-mmix.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-sh64.c: Likewise. + * elf64-x86-64.c: Likewise. + 2002-06-02 Richard Henderson * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index ad7247ac0f..ff5c5f4718 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -235,7 +235,7 @@ arc_elf_b22_pcrel (abfd, reloc_entry, symbol, data, input_section, return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); } - + #define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec #define TARGET_LITTLE_NAME "elf32-littlearc" #define TARGET_BIG_SYM bfd_elf32_bigarc_vec diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 8285fbdabe..939eee5f48 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -628,7 +628,7 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) /* Save the bfd for later use. */ globals->bfd_of_glue_owner = abfd; - + return true; } @@ -1540,7 +1540,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, signed_check = check | ~((bfd_vma) -1 >> howto->rightshift); relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask)); - + bfd_put_16 (input_bfd, relocation, hit_data); /* Assumes two's complement. */ @@ -1549,7 +1549,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; } - + case R_ARM_GNU_VTINHERIT: case R_ARM_GNU_VTENTRY: return bfd_reloc_ok; @@ -1574,7 +1574,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, if (sgot == NULL) return bfd_reloc_notsupported; - /* If we are addressing a Thumb function, we need to adjust the + /* If we are addressing a Thumb function, we need to adjust the address by one, so that attempts to call the function pointer will correctly interpret it as Thumb code. */ if (sym_flags == STT_ARM_TFUNC) @@ -2374,7 +2374,7 @@ ERROR: %s uses hardware FP, whereas %s uses software FP"), _bfd_error_handler (_("\ Warning: %s supports interworking, whereas %s does not"), bfd_archive_filename (ibfd), - bfd_get_filename (obfd)); + bfd_get_filename (obfd)); } else { diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index ab72483304..28fecf18aa 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -547,7 +547,7 @@ cris_elf_grok_psinfo (abfd, note) static const bfd_byte elf_cris_plt0_entry[PLT_ENTRY_SIZE] = { 0xfc, 0xe1, - 0x7e, 0x7e, /* push mof. */ + 0x7e, 0x7e, /* push mof. */ 0x7f, 0x0d, /* (dip [pc+]) */ 0, 0, 0, 0, /* Replaced with address of .got + 4. */ 0x30, 0x7a, /* move [...],mof */ diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index d7d419c962..5311023bf5 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -488,7 +488,7 @@ elf32_dlx_relocate26 (abfd, reloc_entry, symbol, data, /* A mapping from BFD reloc types to DLX ELF reloc types. Stolen from elf32-mips.c. - + More about this table - for dlx elf relocation we do not really need this table, if we have a rtype defined in this table will caused tc_gen_relocate confused and die on us, but if we remove diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 4dc7e9b16d..6615fca876 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -2558,7 +2558,7 @@ elf32_hppa_size_dynamic_sections (output_bfd, info) /* Set up various things so that we can make a list of input sections for each output section included in the link. Returns -1 on error, - 0 when no stubs will be needed, and 1 on success. */ + 0 when no stubs will be needed, and 1 on success. */ int elf32_hppa_setup_section_lists (output_bfd, info) diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index f5b64771e3..652fb1a776 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -594,7 +594,7 @@ elf_i386_mkobject (abfd) return false; return true; } - + static boolean elf_i386_object_p (abfd) bfd *abfd; @@ -1400,7 +1400,7 @@ elf_i386_adjust_dynamic_symbol (info, h) } /* If we didn't find any dynamic relocs in read-only sections, then - we'll be keeping the dynamic relocs and avoiding the copy reloc. */ + we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (p == NULL) { h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF; @@ -1552,7 +1552,7 @@ allocate_dynrelocs (h, inf) && !info->shared && h->dynindx == -1 && elf_i386_hash_entry(h)->tls_type == GOT_TLS_IE) - h->got.offset = (bfd_vma) -1; + h->got.offset = (bfd_vma) -1; else if (h->got.refcount > 0) { asection *s; @@ -2885,7 +2885,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym) the .plt section. Leave the value alone. This is a clue for the dynamic linker, to make function pointer comparisons work between an application and shared - library. */ + library. */ sym->st_shndx = SHN_UNDEF; } } diff --git a/bfd/elf32-i386qnx.c b/bfd/elf32-i386qnx.c index 8b08f0a8b0..5f2e1113f4 100644 --- a/bfd/elf32-i386qnx.c +++ b/bfd/elf32-i386qnx.c @@ -40,7 +40,7 @@ elf_i386qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec) bfd *obfd; asection *osec; { - /* We don't use these parameters, but another target might. */ + /* We don't use these parameters, but another target might. */ ibfd = ibfd; obfd = obfd; osec = osec; @@ -50,7 +50,7 @@ elf_i386qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec) static boolean elf_i386qnx_is_contained_by_filepos (section, segment) asection *section; - Elf_Internal_Phdr *segment; + Elf_Internal_Phdr *segment; { return ((bfd_vma) section->filepos >= segment->p_offset && ((bfd_vma) section->filepos + section->_raw_size @@ -60,7 +60,7 @@ elf_i386qnx_is_contained_by_filepos (section, segment) static void elf_i386qnx_set_nonloadable_filepos (abfd, phdrs) bfd *abfd; - Elf_Internal_Phdr *phdrs; + Elf_Internal_Phdr *phdrs; { struct elf_segment_map *m; Elf_Internal_Phdr *p; diff --git a/bfd/elf32-or32.c b/bfd/elf32-or32.c index eed0b99168..a61b09d415 100644 --- a/bfd/elf32-or32.c +++ b/bfd/elf32-or32.c @@ -277,19 +277,19 @@ or32_elf_32_reloc (abfd, reloc_entry, symbol, data, input_section, asection *input_section; bfd *output_bfd; char **error_message ATTRIBUTE_UNUSED; -{ +{ if (output_bfd != (bfd *) NULL) { unsigned long insn; bfd_size_type addr = reloc_entry->address; reloc_entry->address += input_section->output_offset; - + insn = bfd_get_32 (abfd, (bfd_byte *) data + addr); insn += symbol->section->output_section->vma; insn += symbol->section->output_offset; insn += symbol->value; - bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); + bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); return bfd_reloc_ok; } @@ -307,7 +307,7 @@ or32_elf_16_reloc (abfd, reloc_entry, symbol, data, input_section, asection *input_section; bfd *output_bfd; char **error_message ATTRIBUTE_UNUSED; -{ +{ if (output_bfd != (bfd *) NULL) { unsigned short insn; @@ -319,7 +319,7 @@ or32_elf_16_reloc (abfd, reloc_entry, symbol, data, input_section, insn += symbol->section->output_section->vma; insn += symbol->section->output_offset; insn += symbol->value; - bfd_put_16 (abfd, insn, (bfd_byte *) data + addr); + bfd_put_16 (abfd, insn, (bfd_byte *) data + addr); return bfd_reloc_ok; } @@ -337,7 +337,7 @@ or32_elf_8_reloc (abfd, reloc_entry, symbol, data, input_section, asection *input_section; bfd *output_bfd; char **error_message ATTRIBUTE_UNUSED; -{ +{ if (output_bfd != (bfd *) NULL) { unsigned char insn; @@ -349,7 +349,7 @@ or32_elf_8_reloc (abfd, reloc_entry, symbol, data, input_section, insn += symbol->section->output_section->vma; insn += symbol->section->output_offset; insn += symbol->value; - bfd_put_8 (abfd, insn, (bfd_byte *) data + addr); + bfd_put_8 (abfd, insn, (bfd_byte *) data + addr); return bfd_reloc_ok; } @@ -391,7 +391,7 @@ or32_elf_consth_reloc (abfd, reloc_entry, symbol, data, input_section, bfd_reloc_status_type ret; bfd_vma relocation; struct or32_consth *n; - + ret = bfd_reloc_ok; if (bfd_is_und_section (symbol->section) @@ -505,7 +505,7 @@ or32_elf_jumptarg_reloc (abfd, reloc_entry, symbol, data, input_section, asection *input_section; bfd *output_bfd; char **error_message ATTRIBUTE_UNUSED; -{ +{ if (output_bfd != (bfd *) NULL) { unsigned long insn, tmp; @@ -517,7 +517,7 @@ or32_elf_jumptarg_reloc (abfd, reloc_entry, symbol, data, input_section, tmp = insn | 0xfc000000; tmp -= (input_section->output_offset >> 2); insn = (insn & 0xfc000000) | (tmp & 0x03ffffff); - bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); + bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); return bfd_reloc_ok; } diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 5032a5c52d..cdbdcba03d 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1064,7 +1064,7 @@ elf_s390_adjust_dynamic_symbol (info, h) /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later - (although we could actually do it here). */ + (although we could actually do it here). */ if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c index 5e7ccdd682..1eb4f11801 100644 --- a/bfd/elf32-sh64.c +++ b/bfd/elf32-sh64.c @@ -880,7 +880,7 @@ sh64_address_in_cranges (cranges, addr, rangep) /* Try and find a matching range. */ found_rangep - = bsearch (&addr, cranges_contents, cranges_size / SH64_CRANGE_SIZE, + = bsearch (&addr, cranges_contents, cranges_size / SH64_CRANGE_SIZE, SH64_CRANGE_SIZE, bfd_big_endian (cranges->owner) ? crange_bsearch_cmpb : crange_bsearch_cmpl); diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index ad04283b33..aecc6bc6c8 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -675,7 +675,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs) bfd_get_filename (abfd), rel->r_addend, h->root.root.string, eh->got_addend); - + } } break; @@ -1582,7 +1582,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section, { /* This is actually a static link, or it is a -Bsymbolic link and the symbol is defined locally or there is no symbol. - Change the GOT32 entry to a PC32 entry. */ + Change the GOT32 entry to a PC32 entry. */ break; } @@ -1673,7 +1673,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section, got_offset = (plt_index + 3) * 4; /* We want the relocate to point into the .got.plt instead - of the plt itself. */ + of the plt itself. */ relocation = (sgotplt->output_section->vma + sgotplt->output_offset + got_offset); @@ -1809,7 +1809,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section, } if (!strcmp (bfd_get_section_name (input_bfd, input_section), - ".text") != 0 || + ".text") != 0 || (info->shared && ELF32_R_TYPE(outrel.r_info) != R_VAX_32 && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE @@ -2158,7 +2158,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info) + sgot->output_offset + 8 - (splt->output_section->vma + 12)), splt->contents + 8); - elf_section_data (splt->output_section)->this_hdr.sh_entsize + elf_section_data (splt->output_section)->this_hdr.sh_entsize = PLT_ENTRY_SIZE; } } diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index d6b8dd3c49..d1e4fb11e5 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Forward declarations. */ static reloc_howto_type * xstormy16_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); -static void xstormy16_info_to_howto_rela +static void xstormy16_info_to_howto_rela PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *)); -static bfd_reloc_status_type xstormy16_elf_24_reloc +static bfd_reloc_status_type xstormy16_elf_24_reloc PARAMS ((bfd *abfd, arelent *reloc_entry, asymbol *symbol, PTR data, asection *input_section, bfd *output_bfd, char **error_message)); @@ -45,7 +45,7 @@ static boolean xstormy16_elf_relax_section boolean *again)); static boolean xstormy16_elf_always_size_sections PARAMS ((bfd *, struct bfd_link_info *)); -static boolean xstormy16_elf_relocate_section +static boolean xstormy16_elf_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static boolean xstormy16_elf_finish_dynamic_sections @@ -88,7 +88,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + /* A 16 bit absolute relocation. */ HOWTO (R_XSTORMY16_16, /* type */ 0, /* rightshift */ @@ -103,7 +103,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + /* An 8 bit absolute relocation. */ HOWTO (R_XSTORMY16_8, /* type */ 0, /* rightshift */ @@ -118,7 +118,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + /* A 32 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC32, /* type */ 0, /* rightshift */ @@ -133,7 +133,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ - + /* A 16 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC16, /* type */ 0, /* rightshift */ @@ -148,7 +148,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ - + /* An 8 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC8, /* type */ 0, /* rightshift */ @@ -163,7 +163,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ - + /* A 12-bit pc-relative relocation suitable for the branch instructions. */ HOWTO (R_XSTORMY16_REL_12, /* type */ 1, /* rightshift */ @@ -178,7 +178,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0x0fff, /* dst_mask */ true), /* pcrel_offset */ - + /* A 24-bit absolute relocation suitable for the jump instructions. */ HOWTO (R_XSTORMY16_24, /* type */ 0, /* rightshift */ @@ -193,7 +193,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* src_mask */ 0xffff00ff, /* dst_mask */ true), /* pcrel_offset */ - + /* A 16 bit absolute relocation to a function pointer. */ HOWTO (R_XSTORMY16_FPTR16, /* type */ 0, /* rightshift */ @@ -209,7 +209,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ }; - + static reloc_howto_type xstormy16_elf_howto_table2 [] = { /* GNU extension to record C++ vtable hierarchy */ @@ -241,7 +241,7 @@ static reloc_howto_type xstormy16_elf_howto_table2 [] = 0, /* src_mask */ 0, /* dst_mask */ false), /* pcrel_offset */ - + }; /* Map BFD reloc types to XSTORMY16 ELF reloc types. */ @@ -286,7 +286,7 @@ xstormy16_reloc_type_lookup (abfd, code) return entry->table + (entry->xstormy16_reloc_val - entry->table[0].type); } - + return NULL; } @@ -451,7 +451,7 @@ xstormy16_elf_check_relocs (abfd, info, sec, relocs) if (local_plt_offsets == NULL) return false; elf_local_got_offsets (abfd) = local_plt_offsets; - + for (i = 0; i < symtab_hdr->sh_info; i++) local_plt_offsets[i] = (bfd_vma) -1; } @@ -471,7 +471,7 @@ xstormy16_elf_check_relocs (abfd, info, sec, relocs) if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) return false; break; - + /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_XSTORMY16_GNU_VTENTRY: @@ -578,7 +578,7 @@ xstormy16_elf_relax_section (dynobj, splt, info, again) if (splt->_cooked_size == 0) splt->_cooked_size = splt->_raw_size; - /* Map across all global symbols; see which ones happen to + /* Map across all global symbols; see which ones happen to fall in the low 64k. */ relax_plt_data.splt = splt; relax_plt_data.again = again; @@ -813,19 +813,19 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_reloc_status_type r; const char * name = NULL; int r_type; - + r_type = ELF32_R_TYPE (rel->r_info); - + if ( r_type == R_XSTORMY16_GNU_VTINHERIT || r_type == R_XSTORMY16_GNU_VTENTRY) continue; - + r_symndx = ELF32_R_SYM (rel->r_info); howto = xstormy16_elf_howto_table + ELF32_R_TYPE (rel->r_info); h = NULL; sym = NULL; sec = NULL; - + if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -833,7 +833,7 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = (sec->output_section->vma + sec->output_offset + sym->st_value); - + 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; @@ -841,13 +841,13 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, else { h = sym_hashes [r_symndx - symtab_hdr->sh_info]; - + while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; name = h->root.root.string; - + if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { @@ -869,14 +869,14 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = 0; } } - + switch (ELF32_R_TYPE (rel->r_info)) { case R_XSTORMY16_24: { bfd_vma reloc = relocation + rel->r_addend; unsigned int x; - + x = bfd_get_32 (input_bfd, contents + rel->r_offset); x &= 0x0000ff00; x |= reloc & 0xff; @@ -952,13 +952,13 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, (info, name, howto->name, (bfd_vma) 0, input_bfd, input_section, rel->r_offset); break; - + case bfd_reloc_undefined: r = info->callbacks->undefined_symbol (info, name, input_bfd, input_section, rel->r_offset, true); break; - + case bfd_reloc_outofrange: msg = _("internal error: out of range error"); break; diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 8fcfeb3ac8..fcc33d14d1 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1454,7 +1454,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel) R_ALPHA_GPDISP)); if (gpdisp) { - bfd_byte *p_ldah = info->contents + gpdisp->r_offset; + bfd_byte *p_ldah = info->contents + gpdisp->r_offset; bfd_byte *p_lda = p_ldah + gpdisp->r_addend; unsigned int ldah = bfd_get_32 (info->abfd, p_ldah); unsigned int lda = bfd_get_32 (info->abfd, p_lda); @@ -1636,7 +1636,7 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type) insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16); bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset); info->changed_contents = true; - + switch (r_type) { case R_ALPHA_LITERAL: @@ -2082,7 +2082,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) info.relocs = internal_relocs; info.relend = irelend = internal_relocs + sec->reloc_count; - /* Find the GP for this object. Do not store the result back via + /* Find the GP for this object. Do not store the result back via _bfd_set_gp_value, since this could change again before final. */ info.gotobj = alpha_elf_tdata (abfd)->gotobj; if (info.gotobj) @@ -3750,7 +3750,7 @@ elf64_alpha_size_got_sections (info) return true; } -/* Called from relax_section to rebuild the PLT in light of +/* Called from relax_section to rebuild the PLT in light of potential changes in the function's status. */ static boolean @@ -3954,7 +3954,7 @@ elf64_alpha_size_rela_got_section (info) /* Shared libraries often require RELATIVE relocs, and some relocs require attention for the main application as well. */ - + entries = 0; for (i = alpha_elf_hash_table(info)->got_list; i ; i = alpha_elf_tdata(i)->got_link_next) @@ -4585,7 +4585,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, /* The source and destination gp must be the same. Note that the source will always have an assigned gp, since we forced one in check_relocs, but that the destination may not, as - it might not have had any relocations at all. Also take + it might not have had any relocations at all. Also take care not to crash if H is an undefined symbol. */ if (h != NULL && sec != NULL && alpha_elf_tdata (sec->owner)->gotobj diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index 96146ed016..bfc88d9be3 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -943,7 +943,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value) value += addr; break; } - /* FALLTHROUGH. */ + /* FALLTHROUGH. */ case R_MMIX_ADDR19: case R_MMIX_ADDR27: /* These must be in range, or else we emit an error. */ diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 565df01481..6b17b2b7c6 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -108,7 +108,7 @@ static boolean ppc64_elf_section_from_shdr #define CROR_151515 0x4def7b82 #define CROR_313131 0x4ffffb82 -/* .glink entries for the first 32k functions are two instructions. */ +/* .glink entries for the first 32k functions are two instructions. */ #define LI_R0_0 0x38000000 /* li %r0,0 */ #define B_DOT 0x48000000 /* b . */ @@ -525,7 +525,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 32, /* bitsize */ true, /* pc_relative */ 0, /* bitpos */ - /* FIXME: Verify. Was complain_overflow_bitfield. */ + /* FIXME: Verify. Was complain_overflow_bitfield. */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC64_REL32", /* name */ @@ -798,7 +798,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 0xffffffffffffffff, /* dst_mask */ true), /* pcrel_offset */ - /* 64-bit relocation to the symbol's procedure linkage table. */ + /* 64-bit relocation to the symbol's procedure linkage table. */ HOWTO (R_PPC64_PLT64, /* type */ 0, /* rightshift */ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */ @@ -1388,7 +1388,7 @@ ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Adjust the addend for sign extension of the low 16 bits. @@ -1419,7 +1419,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); octets = reloc_entry->address * bfd_octets_per_byte (abfd); @@ -1428,7 +1428,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data, r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type; if (r_type == R_PPC64_ADDR14_BRTAKEN || r_type == R_PPC64_REL14_BRTAKEN) - insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ + insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ if (is_power4) { @@ -1480,7 +1480,7 @@ ppc64_elf_sectoff_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Subtract the symbol section base address. */ @@ -1503,7 +1503,7 @@ ppc64_elf_sectoff_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Subtract the symbol section base address. */ @@ -1531,7 +1531,7 @@ ppc64_elf_toc_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1560,7 +1560,7 @@ ppc64_elf_toc_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1593,7 +1593,7 @@ ppc64_elf_toc64_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1620,7 +1620,7 @@ ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); if (error_message != NULL) @@ -4332,7 +4332,7 @@ ppc_size_one_stub (gen_entry, in_arg) /* Set up various things so that we can make a list of input sections for each output section included in the link. Returns -1 on error, - 0 when no stubs will be needed, and 1 on success. */ + 0 when no stubs will be needed, and 1 on success. */ int ppc64_elf_setup_section_lists (output_bfd, info) @@ -5230,8 +5230,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, /* Branch taken prediction relocations. */ case R_PPC64_ADDR14_BRTAKEN: case R_PPC64_REL14_BRTAKEN: - insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ - /* Fall thru. */ + insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ + /* Fall thru. */ /* Branch not taken prediction relocations. */ case R_PPC64_ADDR14_BRNTAKEN: diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index ceb5efa086..0d59f46184 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1019,7 +1019,7 @@ elf_s390_adjust_dynamic_symbol (info, h) /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later - (although we could actually do it here). */ + (although we could actually do it here). */ if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index b168934e96..91762fad34 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -1342,8 +1342,8 @@ sh_elf64_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd, return bfd_reloc_undefined; if (bfd_is_com_section (symbol_in->section)) - sym_value = 0; - else + sym_value = 0; + else sym_value = (symbol_in->value + symbol_in->section->output_section->vma + symbol_in->section->output_offset); @@ -1614,7 +1614,7 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section, sec = h->root.u.def.section; /* In these cases, we don't need the relocation value. We check specially because in some obscure cases - sec->output_section will be NULL. */ + sec->output_section will be NULL. */ if (r_type == R_SH_GOTPC_LOW16 || r_type == R_SH_GOTPC_MEDLOW16 || r_type == R_SH_GOTPC_MEDHI16 @@ -1756,7 +1756,7 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section, skip = true; else if (outrel.r_offset == (bfd_vma) -2) skip = true, relocate = true; - + outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2507,7 +2507,7 @@ sh_elf64_gc_sweep_hook (abfd, info, sec, relocs) /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ - + static boolean sh_elf64_check_relocs (abfd, info, sec, relocs) bfd *abfd; @@ -2537,7 +2537,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym); if (!elf_bad_symtab (abfd)) sym_hashes_end -= symtab_hdr->sh_info; - + dynobj = elf_hash_table (info)->dynobj; local_got_offsets = elf_local_got_offsets (abfd); @@ -2546,13 +2546,13 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) { struct elf_link_hash_entry *h; unsigned long r_symndx; - + r_symndx = ELF64_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) h = NULL; else h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - + /* Some relocs require a global offset table. */ if (dynobj == NULL) { @@ -2596,7 +2596,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) if (!_bfd_elf64_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) return false; break; - + /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SH_GNU_VTENTRY: @@ -2881,7 +2881,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs) break; } } - + return true; } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 66a27db0ed..0ec6392dff 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -125,9 +125,9 @@ static reloc_howto_type *elf64_x86_64_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); static void elf64_x86_64_info_to_howto PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *)); -static boolean elf64_x86_64_grok_prstatus +static boolean elf64_x86_64_grok_prstatus PARAMS ((bfd *, Elf_Internal_Note *)); -static boolean elf64_x86_64_grok_psinfo +static boolean elf64_x86_64_grok_psinfo PARAMS ((bfd *, Elf_Internal_Note *)); static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create PARAMS ((bfd *)); @@ -228,11 +228,11 @@ elf64_x86_64_grok_prstatus (abfd, note) case 336: /* sizeof(istruct elf_prstatus) on Linux/x86_64 */ /* pr_cursig */ - elf_tdata (abfd)->core_signal + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); /* pr_pid */ - elf_tdata (abfd)->core_pid + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 32); /* pr_reg */ @@ -1087,7 +1087,7 @@ elf64_x86_64_adjust_dynamic_symbol (info, h) /* We must generate a R_X86_64_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the - runtime process image. */ + runtime process image. */ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) { htab->srelbss->_raw_size += sizeof (Elf64_External_Rela); -- 2.34.1