From df4d19f550a890a5f38f787db3b2f2c0555b51e7 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 7 Jan 2024 21:17:24 -0500 Subject: [PATCH] more -Wconversion in bfd/elf32-*.c Change-Id: I75eea1441d7b799f4fa1819b0432708914be26c2 --- .github/workflows/apple-gdb-1824-macos.yml | 35 +++--- .github/workflows/codeql.yml | 2 +- src/bfd/elf32-crx.c | 6 +- src/bfd/elf32-dlx.c | 100 ++++++++--------- src/bfd/elf32-fr30.c | 42 +++---- src/bfd/elf32-frv.c | 11 +- src/bfd/elf32-h8300.c | 85 +++++++------- src/bfd/elf32-hppa.c | 107 +++++++++--------- src/bfd/elf32-i370.c | 74 ++++++------ src/bfd/elf32-i386.c | 124 +++++++++++---------- src/bfd/elf32-ip2k.c | 76 +++++++------ src/bfd/elf32-iq2000.c | 62 +++++------ src/bfd/po/bfd.pot | 109 +++++++++--------- 13 files changed, 421 insertions(+), 412 deletions(-) diff --git a/.github/workflows/apple-gdb-1824-macos.yml b/.github/workflows/apple-gdb-1824-macos.yml index 4af7d48e9..cd614aa13 100644 --- a/.github/workflows/apple-gdb-1824-macos.yml +++ b/.github/workflows/apple-gdb-1824-macos.yml @@ -32,18 +32,18 @@ jobs: - run: test -e ./.profile_generic && test -r ./.profile_generic && source ./.profile_generic && (env | uniq | sort | uniq) && sync - run: ./configure --enable-silent-rules CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }} - run: make -ki -C libcheckpoint || make -ki -C libcheckpoint -f Makefile_orig || make -ki -C macsbug || make -ki -C macsbug/gdb_plugin_support || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi) - - run: if test ! -e libcheckpoint/libcheckpoint.dylib; then (echo "ensuring libcheckpoint is built" && sync && make -ki -C libcheckpoint -f Makefile_orig RC_CFLAGS="-std=gnu89 -w -Wno-error") || (sync && make -ki -C macsbug) || (sync && make -ki -C macsbug/gdb_plugin_support) || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi); else (sync && stat libcheckpoint/libcheckpoint.dylib); fi - - run: if test -d .. && test -w .. && test ! -e ../gdb; then (echo "symlinking source directory" && pushd .. && ln -sv apple-gdb-1824 gdb && sync && readlink gdb && popd); else (sync && stat .. && ls ..); fi + - run: if test ! -e libcheckpoint/libcheckpoint.dylib; then (sync && echo "ensuring libcheckpoint is built" && sync && make -ki -C libcheckpoint -f Makefile_orig RC_CFLAGS="-std=gnu89 -w -Wno-error" && sync) || (sync && make -ki -C macsbug) || (sync && make -ki -C macsbug/gdb_plugin_support) || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi); else (sync && stat libcheckpoint/libcheckpoint.dylib); fi + - run: if test -d .. && test -w .. && test ! -e ../gdb; then (echo "symlinking source directory" && pushd .. && ln -sv apple-gdb-1824 gdb && sync && readlink gdb && sync && popd); else (sync && stat .. && ls ..); fi - run: (if test -n "$(type ant 2>/dev/null)" && test -x "$(which ant)" && test -r build.xml; then if test ! -d build; then mkdir build; elif test ! -d "${HOME}"/work/apple-gdb-1824/build; then mkdir -pv "${HOME}"/work/apple-gdb-1824/build; fi; ant; else (echo "ant missing" && sync); fi) || (if test -x ./gradlew; then (./gradlew build || ./gradlew assemble || ./gradlew); elif test -r ./gradlew; then sh ./gradlew; elif test -e ./gradlew; then stat ./gradlew; else echo "gradlewrapper missing"; fi) || (if test -x "$(which gradle)"; then gradle; else echo "gradle missing"; fi) || (if test -x ~rc/bin/buildit; then sudo ~rc/bin/buildit "$(pwd)" -arch ppc -arch i386 -arch armv5 -target cross -project gdb -release RELEASENAME RC_CROSS_ARCHS=armv6; else echo "buildit missing"; fi) || ls - run: (if test -x ./gradlew; then (./gradlew build || ./gradlew assemble || ./gradlew); elif test -r ./gradlew; then sh ./gradlew; elif test -e ./gradlew; then stat ./gradlew; else echo "gradlewrapper missing" >&2; fi) || (if test -x "$(which gradle)"; then gradle; else echo "gradle missing"; fi) || (if test -x ~rc/bin/buildit; then sudo ~rc/bin/buildit "$(pwd)" -arch ppc -arch i386 -arch armv5 -target cross -project gdb -release RELEASENAME RC_CROSS_ARCHS=armv6; else echo "buildit missing"; fi) || ls - run: cd src && ./configure --disable-werror --disable-opts-test --enable-carbon-framework --enable-debug-symbols-framework --enable-64-bit-bfd --enable-silent-rules CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }} - run: cd src && make configure-bfd - run: cd src && make -C bfd headers - - run: cd src && if test ! -e bfd/bfd.h; then make -C bfd bfd.h; else stat bfd/bfd.h; fi + - run: cd src && if test ! -e bfd/bfd.h; then (sync && make -C bfd bfd.h); else (sync && stat bfd/bfd.h); fi - run: cd src && make -C bfd diststuff - run: cd src && make all-bfd - run: if test ! -e macsbug/MacsBug_plugin; then make -ki -C macsbug || make -ki -C macsbug/gdb_plugin_support || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi); else stat macsbug/MacsBug_plugin; fi - - run: if test ! -e macsbug/gdb_plugin_support/gdb_plugin_support.o; then make -ki -C macsbug/gdb_plugin_support TARGET_ARCHITECTURE="x86_64" || (if test -x "$(which ant)"; then ant; fi) || (for cfile in macsbug/gdb_plugin_support/*.c; do ${{ matrix.compiler }} -c "${cfile}" || stat "${cfile}"; done); else stat macsbug/gdb_plugin_support/gdb_plugin_support.o; fi + - run: if test ! -e macsbug/gdb_plugin_support/gdb_plugin_support.o; then (sync && make -ki -C macsbug/gdb_plugin_support TARGET_ARCHITECTURE="x86_64") || (if test -x "$(which ant)"; then ant; fi) || (for cfile in macsbug/gdb_plugin_support/*.c; do ${{ matrix.compiler }} -c "${cfile}" || stat "${cfile}"; done); else stat macsbug/gdb_plugin_support/gdb_plugin_support.o; fi - run: cd src && make all-opcodes - run: cd src && make configure-binutils - name: Backup that annoying arparse.h header @@ -53,28 +53,34 @@ jobs: if test ! -e arparse.h; then \ echo "make my_arparse.h"; \ make my_arparse.h; \ + else \ + sync && stat arparse.h; \ fi if test ! -f arparse.h; then \ echo "remake arparse.c"; \ remake arparse.c; \ + else \ + sync && wc -l arparse.h; \ fi # shellcheck disable=SC2046 if test ! -e arparse.h; then \ echo "trying the relevant Makefile rule as copied into this CI workflow"; \ /bin/sh ./../ylwrap arparse.y y.tab.c arparse.c y.tab.h "$(echo arparse.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/)" y.output arparse.output -- $(if [ -f ../bison/bison ]; then echo ../bison/bison -y -L./../bison/; else echo bison -o y.tab.c; fi) -d -t -v -k; \ + else \ + sync && du arparse.h; \ fi if test -e arparse.h; then \ if test ! -e ../bfd/arparse.h; then \ - cp -v arparse.h ../bfd; \ + sync && cp -v arparse.h ../bfd; \ elif test ! -e ../include/arparse.h; then \ - cp -v arparse.h ../include; \ + sync && cp -v arparse.h ../include; \ else \ - stat arparse.h; \ + sync && stat arparse.h; \ fi; \ else \ ls ./*.h || ls || pwd; \ fi - find . -name arparse.h -type f -print + sync && find . -name arparse.h -type f -print - run: cd src && make all-binutils - run: cd src && make all-cgen && make all-libiberty && make all-intl - run: cd src && make all-electric-fence @@ -116,21 +122,24 @@ jobs: make check-local || make check stamp-framework ls; \ elif test ${{ matrix.compiler }} == gcc; then \ pushd bfd; \ - make check-DEJAGNU; \ + sync && make check-DEJAGNU; \ popd; \ pushd mmalloc; \ - make info dvi stamp-framework-headers ls; \ + sync && make info dvi stamp-framework-headers ls; \ popd; \ pushd electric-fence; \ - make check stamp-framework ls; \ + sync && make check stamp-framework ls; \ + popd; \ + pushd readline; \ + make lint || make lint-local || make my_TAGS || make tags-local; \ popd; \ else \ echo "error, unhandled compiler!" >&2 && exit 1; \ fi - - run: cd src && make check-opcodes && make check-intl + - run: cd src && make check-opcodes && sync && make check-intl - run: cd src && make check-binutils - run: cd src && make check-utils - - run: time (pwd && ls) + - run: time (pwd && sync && ls) if: "${{ success() }}" - name: Upload a Build Artifact uses: actions/upload-artifact@v4.0.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index baac23ccf..71540de8f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -83,7 +83,7 @@ jobs: else \ (sync && stat /home/runner/work/apple-gdb-1824/build); \ fi - cd src + (cd src && sync && echo "now in $(pwd)...") - name: Dependencies if: matrix.language == 'c-cpp' diff --git a/src/bfd/elf32-crx.c b/src/bfd/elf32-crx.c index 4d01921ce..027ccf696 100644 --- a/src/bfd/elf32-crx.c +++ b/src/bfd/elf32-crx.c @@ -661,10 +661,10 @@ elf32_crx_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd, } /* Now adjust the global symbols defined in this section. */ - symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) + symcount = ((symtab_hdr->sh_size / sizeof(Elf32_External_Sym)) - symtab_hdr->sh_info); - sym_hashes = start_hashes = elf_sym_hashes (abfd); - end_hashes = sym_hashes + symcount; + sym_hashes = start_hashes = elf_sym_hashes(abfd); + end_hashes = (sym_hashes + symcount); for (; sym_hashes < end_hashes; sym_hashes++) { diff --git a/src/bfd/elf32-dlx.c b/src/bfd/elf32-dlx.c index 2ea35865f..9243bb66e 100644 --- a/src/bfd/elf32-dlx.c +++ b/src/bfd/elf32-dlx.c @@ -105,16 +105,12 @@ _bfd_dlx_elf_hi16_reloc(bfd *abfd, arelent *reloc_entry, asymbol *symbol, relocatable output against an external symbol. */ static bfd_reloc_status_type -elf32_dlx_relocate16 (bfd *abfd, - arelent *reloc_entry, - asymbol *symbol, - void * data, - asection *input_section, - bfd *output_bfd, - const char **error_message ATTRIBUTE_UNUSED) +elf32_dlx_relocate16(bfd *abfd, arelent *reloc_entry, asymbol *symbol, + void *data, asection *input_section, bfd *output_bfd, + const char **error_message ATTRIBUTE_UNUSED) { unsigned long insn, vallo, allignment; - int val; + int val; /* HACK: I think this first condition is necessary when producing relocatable output. After the end of HACK, the code is identical @@ -122,29 +118,29 @@ elf32_dlx_relocate16 (bfd *abfd, belongs there rather than here. martindo 1998-10-23. */ if (skip_dlx_elf_hi16_reloc) - 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); /* Check undefined section and undefined symbols. */ - if (bfd_is_und_section (symbol->section) - && output_bfd == (bfd *) NULL) + if (bfd_is_und_section(symbol->section) + && output_bfd == (bfd *)NULL) return bfd_reloc_undefined; /* Can not support a long jump to sections other then .text. */ - if (strcmp (input_section->name, symbol->section->output_section->name) != 0) + if (strcmp(input_section->name, symbol->section->output_section->name) != 0) { - fprintf (stderr, - "BFD Link Error: branch (PC rel16) to section (%s) not supported\n", - symbol->section->output_section->name); + fprintf(stderr, + "BFD Link Error: branch (PC rel16) to section (%s) not supported\n", + symbol->section->output_section->name); return bfd_reloc_undefined; } - insn = bfd_get_32 (abfd, (bfd_byte *)data + reloc_entry->address); - allignment = 1 << (input_section->output_section->alignment_power - 1); - vallo = insn & 0x0000FFFF; + insn = bfd_get_32(abfd, (bfd_byte *)data + reloc_entry->address); + allignment = (1 << (input_section->output_section->alignment_power - 1)); + vallo = (insn & 0x0000FFFF); if (vallo & 0x8000) - vallo = ~(vallo | 0xFFFF0000) + 1; + vallo = (~(vallo | 0xFFFF0000) + 1); /* vallo points to the vma of next instruction. */ vallo += (((unsigned long)(input_section->output_section->vma + @@ -152,32 +148,29 @@ elf32_dlx_relocate16 (bfd *abfd, allignment) & ~allignment); /* val is the displacement (PC relative to next instruction). */ - val = (symbol->section->output_offset + - symbol->section->output_section->vma + - symbol->value) - vallo; + val = ((symbol->section->output_offset + + symbol->section->output_section->vma + + symbol->value) + - (int)vallo); - if (abs ((int) val) > 0x00007FFF) + if (abs((int)val) > 0x00007FFF) return bfd_reloc_outofrange; - insn = (insn & 0xFFFF0000) | (val & 0x0000FFFF); + insn = (insn & 0xFFFF0000) | (val & 0x0000FFFF); - bfd_put_32 (abfd, insn, - (bfd_byte *) data + reloc_entry->address); + bfd_put_32(abfd, insn, (bfd_byte *)data + reloc_entry->address); return bfd_reloc_ok; } +/* */ static bfd_reloc_status_type -elf32_dlx_relocate26 (bfd *abfd, - arelent *reloc_entry, - asymbol *symbol, - void * data, - asection *input_section, - bfd *output_bfd, - const char **error_message ATTRIBUTE_UNUSED) +elf32_dlx_relocate26(bfd *abfd, arelent *reloc_entry, asymbol *symbol, + void *data, asection *input_section, bfd *output_bfd, + const char **error_message ATTRIBUTE_UNUSED) { unsigned long insn, vallo, allignment; - int val; + int val; /* HACK: I think this first condition is necessary when producing relocatable output. After the end of HACK, the code is identical @@ -185,46 +178,45 @@ elf32_dlx_relocate26 (bfd *abfd, belongs there rather than here. martindo 1998-10-23. */ if (skip_dlx_elf_hi16_reloc) - 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); /* Check undefined section and undefined symbols. */ - if (bfd_is_und_section (symbol->section) - && output_bfd == (bfd *) NULL) + if (bfd_is_und_section(symbol->section) + && output_bfd == (bfd *)NULL) return bfd_reloc_undefined; /* Can not support a long jump to sections other then .text */ - if (strcmp (input_section->name, symbol->section->output_section->name) != 0) + if (strcmp(input_section->name, symbol->section->output_section->name) != 0) { - fprintf (stderr, - "BFD Link Error: jump (PC rel26) to section (%s) not supported\n", - symbol->section->output_section->name); + fprintf(stderr, + "BFD Link Error: jump (PC rel26) to section (%s) not supported\n", + symbol->section->output_section->name); return bfd_reloc_undefined; } - insn = bfd_get_32 (abfd, (bfd_byte *)data + reloc_entry->address); - allignment = 1 << (input_section->output_section->alignment_power - 1); - vallo = insn & 0x03FFFFFF; + insn = bfd_get_32(abfd, (bfd_byte *)data + reloc_entry->address); + allignment = (1 << (input_section->output_section->alignment_power - 1)); + vallo = (insn & 0x03FFFFFF); if (vallo & 0x03000000) - vallo = ~(vallo | 0xFC000000) + 1; + vallo = (~(vallo | 0xFC000000) + 1); /* vallo is the vma for the next instruction. */ - vallo += (((unsigned long) (input_section->output_section->vma + - input_section->output_offset) + + vallo += (((unsigned long)(input_section->output_section->vma + + input_section->output_offset) + allignment) & ~allignment); /* val is the displacement (PC relative to next instruction). */ - val = (symbol->section->output_offset + - symbol->section->output_section->vma + symbol->value) - - vallo; + val = ((symbol->section->output_offset + + symbol->section->output_section->vma + symbol->value) + - (int)vallo); - if (abs ((int) val) > 0x01FFFFFF) + if (abs((int)val) > 0x01FFFFFF) return bfd_reloc_outofrange; - insn = (insn & 0xFC000000) | (val & 0x03FFFFFF); - bfd_put_32 (abfd, insn, - (bfd_byte *) data + reloc_entry->address); + insn = ((insn & 0xFC000000) | (val & 0x03FFFFFF)); + bfd_put_32(abfd, insn, (bfd_byte *)data + reloc_entry->address); return bfd_reloc_ok; } diff --git a/src/bfd/elf32-fr30.c b/src/bfd/elf32-fr30.c index e6f7d49da..a84509759 100644 --- a/src/bfd/elf32-fr30.c +++ b/src/bfd/elf32-fr30.c @@ -507,47 +507,49 @@ fr30_elf_relocate_section(bfd *output_bfd, struct bfd_link_info *info, const char *name; int r_type; - r_type = ELF32_R_TYPE (rel->r_info); + r_type = ELF32_R_TYPE(rel->r_info); - if ( r_type == R_FR30_GNU_VTINHERIT - || r_type == R_FR30_GNU_VTENTRY) + if ((r_type == R_FR30_GNU_VTINHERIT) + || (r_type == R_FR30_GNU_VTENTRY)) continue; - r_symndx = ELF32_R_SYM (rel->r_info); + r_symndx = ELF32_R_SYM(rel->r_info); - howto = fr30_elf_howto_table + ELF32_R_TYPE (rel->r_info); - h = NULL; - sym = NULL; - sec = NULL; + howto = (fr30_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; + sym = (local_syms + r_symndx); sec = local_sections [r_symndx]; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + relocation = _bfd_elf_rela_local_sym(output_bfd, sym, &sec, rel); - 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 = + bfd_elf_string_from_elf_section(input_bfd, + (unsigned int)symtab_hdr->sh_link, + (unsigned int)sym->st_name); + name = ((name == NULL) ? bfd_section_name(input_bfd, sec) : name); } else { bfd_boolean unresolved_reloc, warned; - RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, - r_symndx, symtab_hdr, sym_hashes, - h, sec, relocation, - unresolved_reloc, warned); + RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, + r_symndx, symtab_hdr, sym_hashes, + h, sec, relocation, + unresolved_reloc, warned); name = h->root.root.string; } - r = fr30_final_link_relocate (howto, input_bfd, input_section, - contents, rel, relocation); + r = fr30_final_link_relocate(howto, input_bfd, input_section, + contents, rel, relocation); if (r != bfd_reloc_ok) { - const char * msg = (const char *) NULL; + const char *msg = (const char *)NULL; switch (r) { diff --git a/src/bfd/elf32-frv.c b/src/bfd/elf32-frv.c index f0f94bcf8..ce93ef73f 100644 --- a/src/bfd/elf32-frv.c +++ b/src/bfd/elf32-frv.c @@ -1139,20 +1139,21 @@ struct frvfdpic_relocs_info /* Compute a hash with the key fields of an frvfdpic_relocs_info entry. */ static hashval_t -frvfdpic_relocs_info_hash (const void *entry_) +frvfdpic_relocs_info_hash(const void *entry_) { const struct frvfdpic_relocs_info *entry = (const struct frvfdpic_relocs_info *)entry_; - return (entry->symndx == -1 - ? (long) entry->d.h->root.root.hash - : entry->symndx + (long) entry->d.abfd->id * 257) + entry->addend; + return (((entry->symndx == -1) + ? (long)entry->d.h->root.root.hash + : (entry->symndx + ((long)entry->d.abfd->id * 257L))) + + (hashval_t)entry->addend); } /* Test whether the key fields of two frvfdpic_relocs_info entries are identical. */ static int -frvfdpic_relocs_info_eq (const void *entry1, const void *entry2) +frvfdpic_relocs_info_eq(const void *entry1, const void *entry2) { const struct frvfdpic_relocs_info *e1 = (const struct frvfdpic_relocs_info *)entry1; diff --git a/src/bfd/elf32-h8300.c b/src/bfd/elf32-h8300.c index b1ca8769c..47fb91f72 100644 --- a/src/bfd/elf32-h8300.c +++ b/src/bfd/elf32-h8300.c @@ -469,9 +469,9 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { if (sym) name = - (bfd_elf_string_from_elf_section(input_bfd, - symtab_hdr->sh_link, - sym->st_name)); + bfd_elf_string_from_elf_section(input_bfd, + (unsigned int)symtab_hdr->sh_link, + (unsigned int)sym->st_name); if ((name == NULL) || (*name == '\0')) name = bfd_section_name(input_bfd, sec); } @@ -479,17 +479,17 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, switch (r) { case bfd_reloc_overflow: - if (! ((*info->callbacks->reloc_overflow) - (info, (h ? &h->root : NULL), name, howto->name, - (bfd_vma) 0, input_bfd, input_section, - rel->r_offset))) + if (!((*info->callbacks->reloc_overflow) + (info, (h ? &h->root : NULL), name, howto->name, + (bfd_vma)0UL, input_bfd, input_section, + rel->r_offset))) return FALSE; break; case bfd_reloc_undefined: - if (! ((*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, - rel->r_offset, TRUE))) + if (!((*info->callbacks->undefined_symbol) + (info, name, input_bfd, input_section, + rel->r_offset, TRUE))) return FALSE; break; @@ -598,18 +598,18 @@ elf32_h8_final_write_processing (bfd *abfd, break; } - elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH); - elf_elfheader (abfd)->e_flags |= val; + elf_elfheader(abfd)->e_flags &= ~(EF_H8_MACH); + elf_elfheader(abfd)->e_flags |= val; } /* Return nonzero if ABFD represents a valid H8 ELF object file; also record the encoded machine type found in the ELF flags. */ static bfd_boolean -elf32_h8_object_p (bfd *abfd) +elf32_h8_object_p(bfd *abfd) { - bfd_default_set_arch_mach (abfd, bfd_arch_h8300, - elf32_h8_mach (elf_elfheader (abfd)->e_flags)); + bfd_default_set_arch_mach(abfd, bfd_arch_h8300, + elf32_h8_mach(elf_elfheader(abfd)->e_flags)); return TRUE; } @@ -618,17 +618,17 @@ elf32_h8_object_p (bfd *abfd) time is the architecture/machine information. */ static bfd_boolean -elf32_h8_merge_private_bfd_data (bfd *ibfd, bfd *obfd) +elf32_h8_merge_private_bfd_data(bfd *ibfd, bfd *obfd) { - if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour - || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + if ((bfd_get_flavour(ibfd) != bfd_target_elf_flavour) + || (bfd_get_flavour(obfd) != bfd_target_elf_flavour)) return TRUE; - if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) - && bfd_get_mach (obfd) < bfd_get_mach (ibfd)) + if (bfd_get_arch(obfd) == bfd_get_arch(ibfd) + && bfd_get_mach(obfd) < bfd_get_mach(ibfd)) { - if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), - bfd_get_mach (ibfd))) + if (!bfd_set_arch_mach(obfd, bfd_get_arch(ibfd), + bfd_get_mach(ibfd))) return FALSE; } @@ -1269,7 +1269,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* Delete some bytes from a section while relaxing. */ static bfd_boolean -elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) +elf32_h8_relax_delete_bytes(bfd *abfd, asection *sec, bfd_vma addr, int count) { Elf_Internal_Shdr *symtab_hdr; unsigned int sec_shndx; @@ -1281,11 +1281,11 @@ elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) bfd_vma toaddr; struct elf_link_hash_entry **sym_hashes; struct elf_link_hash_entry **end_hashes; - unsigned int symcount; + unsigned long symcount; - sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec); + sec_shndx = _bfd_elf_section_from_bfd_section(abfd, sec); - contents = elf_section_data (sec)->this_hdr.contents; + contents = elf_section_data(sec)->this_hdr.contents; /* The deletion must stop at the next ALIGN reloc for an aligment power larger than the number of bytes we are deleting. */ @@ -1293,40 +1293,39 @@ elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) irelalign = NULL; toaddr = sec->size; - irel = elf_section_data (sec)->relocs; - irelend = irel + sec->reloc_count; + irel = elf_section_data(sec)->relocs; + irelend = (irel + sec->reloc_count); /* Actually delete the bytes. */ - memmove (contents + addr, contents + addr + count, - (size_t) (toaddr - addr - count)); + memmove((contents + addr), (contents + addr + count), + (size_t)(toaddr - addr - count)); sec->size -= count; /* Adjust all the relocs. */ - for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++) + for (irel = elf_section_data(sec)->relocs; irel < irelend; irel++) { - /* Get the new reloc address. */ - if ((irel->r_offset > addr - && irel->r_offset < toaddr)) + /* Get the new reloc address: */ + if ((irel->r_offset > addr) && (irel->r_offset < toaddr)) irel->r_offset -= count; } /* Adjust the local symbols defined in this section. */ - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - isym = (Elf_Internal_Sym *) symtab_hdr->contents; - isymend = isym + symtab_hdr->sh_info; + symtab_hdr = &elf_tdata(abfd)->symtab_hdr; + isym = (Elf_Internal_Sym *)symtab_hdr->contents; + isymend = (isym + symtab_hdr->sh_info); for (; isym < isymend; isym++) { - if (isym->st_shndx == sec_shndx - && isym->st_value > addr - && isym->st_value < toaddr) + if ((isym->st_shndx == sec_shndx) + && (isym->st_value > addr) + && (isym->st_value < toaddr)) isym->st_value -= count; } /* Now adjust the global symbols defined in this section. */ - symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) + symcount = ((symtab_hdr->sh_size / sizeof(Elf32_External_Sym)) - symtab_hdr->sh_info); - sym_hashes = elf_sym_hashes (abfd); - end_hashes = sym_hashes + symcount; + sym_hashes = elf_sym_hashes(abfd); + end_hashes = (sym_hashes + symcount); for (; sym_hashes < end_hashes; sym_hashes++) { struct elf_link_hash_entry *sym_hash = *sym_hashes; diff --git a/src/bfd/elf32-hppa.c b/src/bfd/elf32-hppa.c index baa16ff55..40a87b50f 100644 --- a/src/bfd/elf32-hppa.c +++ b/src/bfd/elf32-hppa.c @@ -726,11 +726,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) + hsh->target_section->output_offset + hsh->target_section->output_section->vma); - val = hppa_field_adjust(sym_value, 0, e_lrsel); + val = (int)hppa_field_adjust(sym_value, 0, e_lrsel); insn = hppa_rebuild_insn((int)LDIL_R1, val, 21); bfd_put_32(stub_bfd, insn, loc); - val = (hppa_field_adjust(sym_value, 0, e_rrsel) >> 2); + val = (int)(hppa_field_adjust(sym_value, 0, e_rrsel) >> 2); insn = hppa_rebuild_insn((int)BE_SR4_R1, val, 17); bfd_put_32(stub_bfd, insn, (loc + 4)); @@ -749,11 +749,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) + stub_sec->output_section->vma); bfd_put_32(stub_bfd, (bfd_vma)BL_R1, loc); - val = hppa_field_adjust(sym_value, (bfd_signed_vma)-8, e_lrsel); + val = (int)hppa_field_adjust(sym_value, (bfd_signed_vma)-8, e_lrsel); insn = hppa_rebuild_insn((int)ADDIL_R1, val, 21); bfd_put_32(stub_bfd, insn, (loc + 4)); - val = (hppa_field_adjust(sym_value, (bfd_signed_vma)-8, e_rrsel) >> 2); + val = (int)(hppa_field_adjust(sym_value, (bfd_signed_vma)-8, e_rrsel) >> 2); insn = hppa_rebuild_insn((int)BE_SR4_R1, val, 17); bfd_put_32(stub_bfd, insn, (loc + 8)); size = 12; @@ -776,7 +776,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) if (hsh->stub_type == hppa_stub_import_shared) insn = ADDIL_R19; #endif /* R19_STUBS */ - val = hppa_field_adjust(sym_value, 0, e_lrsel); + val = (int)hppa_field_adjust(sym_value, 0, e_lrsel); insn = hppa_rebuild_insn((int)insn, val, 21); bfd_put_32(stub_bfd, insn, loc); @@ -785,29 +785,29 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) lsel/rsel then with unfortunate sym_values we will round sym_value+4 up to the next 2k block leading to a mis-match between the lsel and rsel value. */ - val = hppa_field_adjust(sym_value, 0, e_rrsel); + val = (int)hppa_field_adjust(sym_value, 0, e_rrsel); insn = hppa_rebuild_insn((int)LDW_R1_R21, val, 14); bfd_put_32(stub_bfd, insn, (loc + 4)); if (htab->multi_subspace) { - val = hppa_field_adjust(sym_value, (bfd_signed_vma)4L, e_rrsel); + val = (int)hppa_field_adjust(sym_value, (bfd_signed_vma)4L, e_rrsel); insn = hppa_rebuild_insn((int)LDW_R1_DLT, val, 14); - bfd_put_32 (stub_bfd, insn, loc + 8); + bfd_put_32(stub_bfd, insn, (loc + 8)); - bfd_put_32 (stub_bfd, (bfd_vma) LDSID_R21_R1, loc + 12); - bfd_put_32 (stub_bfd, (bfd_vma) MTSP_R1, loc + 16); - bfd_put_32 (stub_bfd, (bfd_vma) BE_SR0_R21, loc + 20); - bfd_put_32 (stub_bfd, (bfd_vma) STW_RP, loc + 24); + bfd_put_32(stub_bfd, (bfd_vma)LDSID_R21_R1, (loc + 12)); + bfd_put_32(stub_bfd, (bfd_vma)MTSP_R1, (loc + 16)); + bfd_put_32(stub_bfd, (bfd_vma)BE_SR0_R21, (loc + 20)); + bfd_put_32(stub_bfd, (bfd_vma)STW_RP, (loc + 24)); size = 28; } else { - bfd_put_32 (stub_bfd, (bfd_vma) BV_R0_R21, loc + 8); - val = hppa_field_adjust (sym_value, (bfd_signed_vma) 4, e_rrsel); - insn = hppa_rebuild_insn ((int) LDW_R1_DLT, val, 14); - bfd_put_32 (stub_bfd, insn, loc + 12); + bfd_put_32(stub_bfd, (bfd_vma)BV_R0_R21, (loc + 8)); + val = (int)hppa_field_adjust(sym_value, (bfd_signed_vma)4L, e_rrsel); + insn = hppa_rebuild_insn((int)LDW_R1_DLT, val, 14); + bfd_put_32(stub_bfd, insn, (loc + 12)); size = 16; } @@ -831,26 +831,24 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) { (*_bfd_error_handler) (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"), - hsh->target_section->owner, - stub_sec, - (long) hsh->stub_offset, + hsh->target_section->owner, stub_sec, (long)hsh->stub_offset, hsh->bh_root.string); - bfd_set_error (bfd_error_bad_value); + bfd_set_error(bfd_error_bad_value); return FALSE; } - val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_fsel) >> 2; + val = (int)(hppa_field_adjust(sym_value, (bfd_signed_vma)-8L, e_fsel) >> 2); if (!htab->has_22bit_branch) - insn = hppa_rebuild_insn ((int) BL_RP, val, 17); + insn = hppa_rebuild_insn((int)BL_RP, val, 17); else - insn = hppa_rebuild_insn ((int) BL22_RP, val, 22); - bfd_put_32 (stub_bfd, insn, loc); + insn = hppa_rebuild_insn((int)BL22_RP, val, 22); + bfd_put_32(stub_bfd, insn, loc); - bfd_put_32 (stub_bfd, (bfd_vma) NOP, loc + 4); - bfd_put_32 (stub_bfd, (bfd_vma) LDW_RP, loc + 8); - bfd_put_32 (stub_bfd, (bfd_vma) LDSID_RP_R1, loc + 12); - bfd_put_32 (stub_bfd, (bfd_vma) MTSP_R1, loc + 16); - bfd_put_32 (stub_bfd, (bfd_vma) BE_SR0_RP, loc + 20); + bfd_put_32(stub_bfd, (bfd_vma)NOP, (loc + 4)); + bfd_put_32(stub_bfd, (bfd_vma)LDW_RP, (loc + 8)); + bfd_put_32(stub_bfd, (bfd_vma)LDSID_RP_R1, (loc + 12)); + bfd_put_32(stub_bfd, (bfd_vma)MTSP_R1, (loc + 16)); + bfd_put_32(stub_bfd, (bfd_vma)BE_SR0_RP, (loc + 20)); /* Point the function symbol at the stub. */ hsh->hh->eh.root.u.def.section = stub_sec; @@ -860,7 +858,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) break; default: - BFD_FAIL (); + BFD_FAIL(); return FALSE; } @@ -929,26 +927,26 @@ hppa_size_one_stub (struct bfd_hash_entry *bh, void *in_arg) Additionally we set the default architecture and machine. */ static bfd_boolean -elf32_hppa_object_p (bfd *abfd) +elf32_hppa_object_p(bfd *abfd) { Elf_Internal_Ehdr * i_ehdrp; unsigned int flags; - i_ehdrp = elf_elfheader (abfd); - if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0) + i_ehdrp = elf_elfheader(abfd); + if (strcmp(bfd_get_target(abfd), "elf32-hppa-linux") == 0) { /* GCC on hppa-linux produces binaries with OSABI=Linux, but the kernel produces corefiles with OSABI=SysV. */ - if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX && - i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ + if ((i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX) + && (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE)) /* aka SYSV */ return FALSE; } - else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0) + else if (strcmp(bfd_get_target(abfd), "elf32-hppa-netbsd") == 0) { /* GCC on hppa-netbsd produces binaries with OSABI=NetBSD, but the kernel produces corefiles with OSABI=SysV. */ - if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NETBSD && - i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ + if ((i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NETBSD) + && (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE)) /* aka SYSV */ return FALSE; } else @@ -957,7 +955,7 @@ elf32_hppa_object_p (bfd *abfd) return FALSE; } - flags = i_ehdrp->e_flags; + flags = (unsigned int)i_ehdrp->e_flags; switch (flags & (EF_PARISC_ARCH | EF_PARISC_WIDE)) { case EFA_PARISC_1_0: @@ -1104,13 +1102,13 @@ elf32_hppa_check_relocs (bfd *abfd, if (info->relocatable) return TRUE; - htab = hppa_link_hash_table (info); - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - eh_syms = elf_sym_hashes (abfd); + htab = hppa_link_hash_table(info); + symtab_hdr = &elf_tdata(abfd)->symtab_hdr; + eh_syms = elf_sym_hashes(abfd); sreloc = NULL; stubreloc = NULL; - rela_end = relocs + sec->reloc_count; + rela_end = (relocs + sec->reloc_count); for (rela = relocs; rela < rela_end; rela++) { enum { @@ -1124,19 +1122,19 @@ elf32_hppa_check_relocs (bfd *abfd, struct elf32_hppa_link_hash_entry *hh; int need_entry = 0; - r_symndx = ELF32_R_SYM (rela->r_info); + r_symndx = (unsigned int)ELF32_R_SYM(rela->r_info); if (r_symndx < symtab_hdr->sh_info) hh = NULL; else { - hh = hppa_elf_hash_entry (eh_syms[r_symndx - symtab_hdr->sh_info]); + hh = hppa_elf_hash_entry(eh_syms[r_symndx - symtab_hdr->sh_info]); while (hh->eh.root.type == bfd_link_hash_indirect || hh->eh.root.type == bfd_link_hash_warning) - hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); + hh = hppa_elf_hash_entry(hh->eh.root.u.i.link); } - r_type = ELF32_R_TYPE (rela->r_info); + r_type = ELF32_R_TYPE(rela->r_info); switch (r_type) { @@ -1649,7 +1647,7 @@ elf32_hppa_gc_sweep_hook (bfd *abfd, /* Support for core dump NOTE sections. */ static bfd_boolean -elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) +elf32_hppa_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; @@ -1661,10 +1659,12 @@ elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) case 396: /* Linux/hppa */ /* pr_cursig */ - elf_tdata(abfd)->core_signal = bfd_get_16(abfd, note->descdata + 12); + elf_tdata(abfd)->core_signal = + (int)bfd_get_16(abfd, (note->descdata + 12)); /* pr_pid */ - elf_tdata(abfd)->core_pid = bfd_get_32(abfd, note->descdata + 24); + elf_tdata(abfd)->core_pid = + (int)bfd_get_32(abfd, (note->descdata + 24)); /* pr_reg */ offset = 72; @@ -1674,12 +1674,13 @@ elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } /* Make a ".reg/999" section. */ - return _bfd_elfcore_make_pseudosection (abfd, ".reg", - size, note->descpos + offset); + return _bfd_elfcore_make_pseudosection(abfd, ".reg", size, + (note->descpos + offset)); } +/* */ static bfd_boolean -elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +elf32_hppa_grok_psinfo(bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { diff --git a/src/bfd/elf32-i370.c b/src/bfd/elf32-i370.c index 84039026d..f3badbd69 100644 --- a/src/bfd/elf32-i370.c +++ b/src/bfd/elf32-i370.c @@ -291,13 +291,13 @@ i370_elf_info_to_howto(bfd *abfd ATTRIBUTE_UNUSED, /* Function to set whether a module needs the -mrelocatable bit set. */ static bfd_boolean -i370_elf_set_private_flags (bfd *abfd, flagword flags) +i370_elf_set_private_flags(bfd *abfd, flagword flags) { - BFD_ASSERT (!elf_flags_init (abfd) - || elf_elfheader (abfd)->e_flags == flags); + BFD_ASSERT(!elf_flags_init(abfd) + || elf_elfheader(abfd)->e_flags == flags); - elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; + elf_elfheader(abfd)->e_flags = flags; + elf_flags_init(abfd) = TRUE; return TRUE; } @@ -305,33 +305,32 @@ i370_elf_set_private_flags (bfd *abfd, flagword flags) object file when linking. */ static bfd_boolean -i370_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) +i370_elf_merge_private_bfd_data(bfd *ibfd, bfd *obfd) { flagword old_flags; flagword new_flags; - if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour - || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + if ((bfd_get_flavour(ibfd) != bfd_target_elf_flavour) + || (bfd_get_flavour(obfd) != bfd_target_elf_flavour)) return TRUE; - new_flags = elf_elfheader (ibfd)->e_flags; - old_flags = elf_elfheader (obfd)->e_flags; - if (!elf_flags_init (obfd)) /* First call, no flags set. */ + new_flags = (flagword)elf_elfheader(ibfd)->e_flags; + old_flags = (flagword)elf_elfheader(obfd)->e_flags; + if (!elf_flags_init(obfd)) /* First call, no flags set. */ { - elf_flags_init (obfd) = TRUE; - elf_elfheader (obfd)->e_flags = new_flags; + elf_flags_init(obfd) = TRUE; + elf_elfheader(obfd)->e_flags = new_flags; } else if (new_flags == old_flags) /* Compatible flags are ok. */ ; - else /* Incompatible flags. */ { (*_bfd_error_handler) - ("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)", - ibfd, (long) new_flags, (long) old_flags); + ("%B: uses diff. e_flags (0x%lx) fields than prev. modules (0x%lx)", + ibfd, (long)new_flags, (long)old_flags); - bfd_set_error (bfd_error_bad_value); + bfd_set_error(bfd_error_bad_value); return FALSE; } @@ -1328,17 +1327,14 @@ i370_elf_relocate_section (bfd *output_bfd, } #ifdef DEBUG - fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n", - howto->name, - (int)r_type, - sym_name, - r_symndx, - (long) offset, - (long) addend); -#endif + fprintf(stderr, + "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n", + howto->name, (int)r_type, sym_name, r_symndx, (long)offset, + (long)addend); +#endif /* DEBUG */ - r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, - offset, relocation, addend); + r = _bfd_final_link_relocate(howto, input_bfd, input_section, contents, + offset, relocation, addend); if (r != bfd_reloc_ok) { @@ -1356,24 +1352,24 @@ i370_elf_relocate_section (bfd *output_bfd, name = NULL; else { - name = bfd_elf_string_from_elf_section (input_bfd, - symtab_hdr->sh_link, - sym->st_name); + name = + bfd_elf_string_from_elf_section(input_bfd, + (unsigned int)symtab_hdr->sh_link, + (unsigned int)sym->st_name); if (name == NULL) break; if (*name == '\0') - name = bfd_section_name (input_bfd, sec); + name = bfd_section_name(input_bfd, sec); } - (*info->callbacks->reloc_overflow) (info, - (h ? &h->root : NULL), - name, - howto->name, - (bfd_vma) 0, - input_bfd, - input_section, - offset); + (*info->callbacks->reloc_overflow)(info, + (h ? &h->root : NULL), + name, howto->name, + (bfd_vma)0UL, + input_bfd, + input_section, + offset); } break; } diff --git a/src/bfd/elf32-i386.c b/src/bfd/elf32-i386.c index 4ce745ca8..c89c26040 100644 --- a/src/bfd/elf32-i386.c +++ b/src/bfd/elf32-i386.c @@ -338,38 +338,40 @@ elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, _bfd_elf_is_local_label_name. */ static bfd_boolean -elf_i386_is_local_label_name (bfd *abfd, const char *name) +elf_i386_is_local_label_name(bfd *abfd, const char *name) { if (name[0] == '.' && name[1] == 'X') return TRUE; - return _bfd_elf_is_local_label_name (abfd, name); + return _bfd_elf_is_local_label_name(abfd, name); } /* Support for core dump NOTE sections. */ static bfd_boolean -elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) +elf_i386_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; - if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0) + if (note->namesz == 8 && strcmp(note->namedata, "FreeBSD") == 0) { - int pr_version = bfd_get_32 (abfd, note->descdata); + int pr_version = (int)bfd_get_32(abfd, note->descdata); if (pr_version != 1) return FALSE; /* pr_cursig */ - elf_tdata (abfd)->core_signal = bfd_get_32 (abfd, note->descdata + 20); + elf_tdata(abfd)->core_signal = + (int)bfd_get_32(abfd, (note->descdata + 20)); /* pr_pid */ - elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + elf_tdata(abfd)->core_pid = + (int)bfd_get_32(abfd, (note->descdata + 24)); /* pr_reg */ offset = 28; - size = bfd_get_32 (abfd, note->descdata + 8); + size = bfd_get_32(abfd, (note->descdata + 8)); } else { @@ -380,10 +382,12 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) case 144: /* Linux/i386 */ /* pr_cursig */ - elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + elf_tdata(abfd)->core_signal = + (int)bfd_get_16(abfd, (note->descdata + 12)); /* pr_pid */ - elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + elf_tdata(abfd)->core_pid = + (int)bfd_get_32(abfd, (note->descdata + 24)); /* pr_reg */ offset = 72; @@ -394,24 +398,25 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } /* Make a ".reg/999" section. */ - return _bfd_elfcore_make_pseudosection (abfd, ".reg", - size, note->descpos + offset); + return _bfd_elfcore_make_pseudosection(abfd, ".reg", size, + (note->descpos + offset)); } +/* */ static bfd_boolean -elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +elf_i386_grok_psinfo(bfd *abfd, Elf_Internal_Note *note) { - if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0) + if (note->namesz == 8 && strcmp(note->namedata, "FreeBSD") == 0) { - int pr_version = bfd_get_32 (abfd, note->descdata); + int pr_version = (int)bfd_get_32(abfd, note->descdata); if (pr_version != 1) return FALSE; - elf_tdata (abfd)->core_program - = _bfd_elfcore_strndup (abfd, note->descdata + 8, 17); - elf_tdata (abfd)->core_command - = _bfd_elfcore_strndup (abfd, note->descdata + 25, 81); + elf_tdata(abfd)->core_program = + _bfd_elfcore_strndup(abfd, (note->descdata + 8), 17); + elf_tdata(abfd)->core_command = + _bfd_elfcore_strndup(abfd, (note->descdata + 25), 81); } else { @@ -421,10 +426,10 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) return FALSE; case 124: /* Linux/i386 elf_prpsinfo. */ - elf_tdata (abfd)->core_program - = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); - elf_tdata (abfd)->core_command - = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + elf_tdata(abfd)->core_program = + _bfd_elfcore_strndup(abfd, (note->descdata + 28), 16); + elf_tdata(abfd)->core_command = + _bfd_elfcore_strndup(abfd, (note->descdata + 44), 80); } } @@ -432,11 +437,11 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) onto the end of the args in some (at least one anyway) implementations, so strip it off if it exists. */ { - char *command = elf_tdata (abfd)->core_command; - int n = strlen (command); + char *command = elf_tdata(abfd)->core_command; + size_t n = strlen(command); - if (0 < n && command[n - 1] == ' ') - command[n - 1] = '\0'; + if ((n > 0UL) && command[n - 1UL] == ' ') + command[n - 1UL] = '\0'; } return TRUE; @@ -2777,7 +2782,7 @@ elf_i386_relocate_section (bfd *output_bfd, outrel.r_offset = (htab->sgot->output_section->vma + htab->sgot->output_offset + off); - sindx0 = (h && (h->dynindx != -1) ? h->dynindx : 0); + sindx0 = (int)((h && (h->dynindx != -1)) ? h->dynindx : 0); if (r_type == R_386_TLS_GD) dr_type = R_386_TLS_DTPMOD32; else if (tls_type == GOT_TLS_IE_POS) @@ -2982,10 +2987,10 @@ elf_i386_relocate_section (bfd *output_bfd, case R_386_TLS_LDO_32: if (info->shared || (input_section->flags & SEC_CODE) == 0) - relocation -= dtpoff_base (info); + relocation -= dtpoff_base(info); else - /* When converting LDO to LE, we must negate. */ - relocation = -tpoff (info, relocation); + /* When converting LDO to LE, we must negate: */ + relocation = -tpoff(info, relocation); break; case R_386_TLS_LE_32: @@ -3001,7 +3006,7 @@ elf_i386_relocate_section (bfd *output_bfd, + input_section->output_section->vma + input_section->output_offset); if ((h != NULL) && (h->dynindx != -1)) - sindx1 = h->dynindx; + sindx1 = (int)h->dynindx; else sindx1 = 0; if (r_type == R_386_TLS_LE_32) @@ -3022,9 +3027,9 @@ elf_i386_relocate_section (bfd *output_bfd, relocation -= dtpoff_base(info); } else if (r_type == R_386_TLS_LE_32) - relocation = tpoff (info, relocation); + relocation = tpoff(info, relocation); else - relocation = -tpoff (info, relocation); + relocation = -tpoff(info, relocation); break; default: @@ -3040,16 +3045,14 @@ elf_i386_relocate_section (bfd *output_bfd, { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"), - input_bfd, - input_section, - (long) rel->r_offset, + input_bfd, input_section, (long)rel->r_offset, h->root.root.string); return FALSE; } - r = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, rel->r_offset, - relocation, 0); + r = _bfd_final_link_relocate(howto, input_bfd, input_section, + contents, rel->r_offset, + relocation, 0); if (r != bfd_reloc_ok) { @@ -3059,29 +3062,28 @@ elf_i386_relocate_section (bfd *output_bfd, name = h->root.root.string; else { - name = bfd_elf_string_from_elf_section (input_bfd, - symtab_hdr->sh_link, - sym->st_name); + name = + bfd_elf_string_from_elf_section(input_bfd, + (unsigned int)symtab_hdr->sh_link, + (unsigned int)sym->st_name); if (name == NULL) return FALSE; if (*name == '\0') - name = bfd_section_name (input_bfd, sec); + name = bfd_section_name(input_bfd, sec); } if (r == bfd_reloc_overflow) { - if (! ((*info->callbacks->reloc_overflow) - (info, (h ? &h->root : NULL), name, howto->name, - (bfd_vma) 0, input_bfd, input_section, - rel->r_offset))) + if (!((*info->callbacks->reloc_overflow) + (info, (h ? &h->root : NULL), name, howto->name, + (bfd_vma)0UL, input_bfd, input_section, rel->r_offset))) return FALSE; } else { (*_bfd_error_handler) (_("%B(%A+0x%lx): reloc against `%s': error %d"), - input_bfd, input_section, - (long) rel->r_offset, name, (int) r); + input_bfd, input_section, (long)rel->r_offset, name, (int)r); return FALSE; } } @@ -3133,13 +3135,13 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, /* Fill in the entry in the procedure linkage table. */ if (! info->shared) { - memcpy (htab->splt->contents + h->plt.offset, elf_i386_plt_entry, - PLT_ENTRY_SIZE); - bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset - + got_offset), - htab->splt->contents + h->plt.offset + 2); + memcpy(htab->splt->contents + h->plt.offset, elf_i386_plt_entry, + PLT_ENTRY_SIZE); + bfd_put_32(output_bfd, + (htab->sgotplt->output_section->vma + + htab->sgotplt->output_offset + + got_offset), + (htab->splt->contents + h->plt.offset + 2)); if (htab->is_vxworks) { @@ -3149,7 +3151,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, for this PLT entry. */ /* S: Current slot number (zero-based). */ - s = (h->plt.offset - PLT_ENTRY_SIZE) / PLT_ENTRY_SIZE; + s = (int)((h->plt.offset - PLT_ENTRY_SIZE) / PLT_ENTRY_SIZE); /* K: Number of relocations for PLTResolve. */ if (info->shared) k = PLTRESOLVE_RELOCS_SHLIB; @@ -3159,13 +3161,13 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, the other PLT slots. */ reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS; loc = (htab->srelplt2->contents + reloc_index - * sizeof (Elf32_External_Rel)); + * sizeof(Elf32_External_Rel)); rel.r_offset = (htab->splt->output_section->vma + htab->splt->output_offset + h->plt.offset + 2); - rel.r_info = ELF32_R_INFO (htab->hgot->indx, R_386_32); - bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); + rel.r_info = ELF32_R_INFO(htab->hgot->indx, R_386_32); + bfd_elf32_swap_reloc_out(output_bfd, &rel, loc); /* Create the R_386_32 relocation referencing the beginning of the PLT for this GOT entry. */ diff --git a/src/bfd/elf32-ip2k.c b/src/bfd/elf32-ip2k.c index 66b23bc8d..e73a39038 100644 --- a/src/bfd/elf32-ip2k.c +++ b/src/bfd/elf32-ip2k.c @@ -1383,14 +1383,14 @@ ip2k_final_link_relocate (reloc_howto_type * howto, accordingly. */ static bfd_boolean -ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info, - bfd *input_bfd, - asection *input_section, - bfd_byte *contents, - Elf_Internal_Rela *relocs, - Elf_Internal_Sym *local_syms, - asection **local_sections) +ip2k_elf_relocate_section(bfd *output_bfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **local_sections) { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -1400,49 +1400,51 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (info->relocatable) return TRUE; - symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; - sym_hashes = elf_sym_hashes (input_bfd); - relend = relocs + input_section->reloc_count; + symtab_hdr = &elf_tdata(input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes(input_bfd); + relend = (relocs + input_section->reloc_count); for (rel = relocs; rel < relend; rel ++) { - reloc_howto_type * howto; - unsigned long r_symndx; - Elf_Internal_Sym * sym; - asection * sec; - struct elf_link_hash_entry * h; - bfd_vma relocation; - bfd_reloc_status_type r; - const char * name = NULL; - int r_type; + reloc_howto_type *howto; + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char *name = NULL; + int r_type; /* This is a final link. */ - r_type = ELF32_R_TYPE (rel->r_info); - r_symndx = ELF32_R_SYM (rel->r_info); - howto = ip2k_elf_howto_table + ELF32_R_TYPE (rel->r_info); - h = NULL; - sym = NULL; - sec = NULL; + r_type = ELF32_R_TYPE(rel->r_info); + r_symndx = ELF32_R_SYM(rel->r_info); + howto = (ip2k_elf_howto_table + r_type); + h = NULL; + sym = NULL; + sec = NULL; if (r_symndx < symtab_hdr->sh_info) { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; - relocation = BASEADDR (sec) + 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; + sym = (local_syms + r_symndx); + sec = local_sections[r_symndx]; + relocation = (BASEADDR(sec) + sym->st_value); + + name = + bfd_elf_string_from_elf_section(input_bfd, + (unsigned int)symtab_hdr->sh_link, + (unsigned int)sym->st_name); + name = ((name == NULL) ? bfd_section_name(input_bfd, sec) : name); } else { bfd_boolean warned; bfd_boolean unresolved_reloc; - RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, - r_symndx, symtab_hdr, sym_hashes, - h, sec, relocation, - unresolved_reloc, warned); + RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, + r_symndx, symtab_hdr, sym_hashes, + h, sec, relocation, + unresolved_reloc, warned); name = h->root.root.string; } diff --git a/src/bfd/elf32-iq2000.c b/src/bfd/elf32-iq2000.c index dd195c431..688265fb2 100644 --- a/src/bfd/elf32-iq2000.c +++ b/src/bfd/elf32-iq2000.c @@ -746,7 +746,7 @@ iq2000_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) file to the output object file when linking. */ static bfd_boolean -iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) +iq2000_elf_merge_private_bfd_data(bfd *ibfd, bfd *obfd) { flagword old_flags, old_partial; flagword new_flags, new_partial; @@ -755,16 +755,15 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) char old_opt[80]; new_opt[0] = old_opt[0] = '\0'; - new_flags = elf_elfheader (ibfd)->e_flags; - old_flags = elf_elfheader (obfd)->e_flags; + new_flags = (flagword)elf_elfheader(ibfd)->e_flags; + old_flags = (flagword)elf_elfheader(obfd)->e_flags; - if (!elf_flags_init (obfd)) + if (!elf_flags_init(obfd)) { - /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; - elf_elfheader (obfd)->e_flags = new_flags; + /* First call, no flags set: */ + elf_flags_init(obfd) = TRUE; + elf_elfheader(obfd)->e_flags = new_flags; } - else if (new_flags != old_flags) { /* Warn if different cpu is used, but allow a @@ -777,24 +776,24 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) switch (new_partial) { case EF_IQ2000_CPU_IQ10: - strcat (new_opt, " -m10"); + strncat(new_opt, " -m10", 5UL); break; default: case EF_IQ2000_CPU_IQ2000: - strcat (new_opt, " -m2000"); + strncat(new_opt, " -m2000", 7UL); break; } switch (old_partial) { case EF_IQ2000_CPU_IQ10: - strcat (old_opt, " -m10"); + strncat(old_opt, " -m10", 5UL); break; default: case EF_IQ2000_CPU_IQ2000: - strcat (old_opt, " -m2000"); + strncat(old_opt, " -m2000", 7UL); break; } } @@ -805,7 +804,7 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) error = TRUE; _bfd_error_handler (_("%s: compiled with %s and linked with modules compiled with %s"), - bfd_get_filename (ibfd), new_opt, old_opt); + bfd_get_filename(ibfd), new_opt, old_opt); } new_flags &= ~ EF_IQ2000_ALL_FLAGS; @@ -817,54 +816,55 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) error = TRUE; _bfd_error_handler - (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), - bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); + (_("%s: uses diff. e_flags (0x%lx) fields than prev. modules (0x%lx)"), + bfd_get_filename(ibfd), (long)new_flags, (long)old_flags); } } if (error) - bfd_set_error (bfd_error_bad_value); + bfd_set_error(bfd_error_bad_value); return !error; } +/* */ static bfd_boolean -iq2000_elf_print_private_bfd_data (bfd *abfd, void * ptr) +iq2000_elf_print_private_bfd_data(bfd *abfd, void * ptr) { - FILE *file = (FILE *) ptr; + FILE *file = (FILE *)ptr; flagword flags; - BFD_ASSERT (abfd != NULL && ptr != NULL); + BFD_ASSERT((abfd != NULL) && (ptr != NULL)); - /* Print normal ELF private data. */ - _bfd_elf_print_private_bfd_data (abfd, ptr); + /* Print normal ELF private data: */ + _bfd_elf_print_private_bfd_data(abfd, ptr); - flags = elf_elfheader (abfd)->e_flags; - fprintf (file, _("private flags = 0x%lx:"), (long)flags); + flags = (flagword)elf_elfheader(abfd)->e_flags; + fprintf(file, _("private flags = 0x%lx:"), (long)flags); switch (flags & EF_IQ2000_CPU_MASK) { case EF_IQ2000_CPU_IQ10: - fprintf (file, " -m10"); + fprintf(file, " -m10"); break; case EF_IQ2000_CPU_IQ2000: - fprintf (file, " -m2000"); + fprintf(file, " -m2000"); break; default: break; } - fputc ('\n', file); + fputc('\n', file); return TRUE; } -static -bfd_boolean -iq2000_elf_object_p (bfd *abfd) +/* */ +static bfd_boolean +iq2000_elf_object_p(bfd *abfd) { - bfd_default_set_arch_mach (abfd, bfd_arch_iq2000, - elf32_iq2000_machine (abfd)); + bfd_default_set_arch_mach(abfd, bfd_arch_iq2000, + elf32_iq2000_machine(abfd)); return TRUE; } diff --git a/src/bfd/po/bfd.pot b/src/bfd/po/bfd.pot index e51bd10be..b403267b6 100644 --- a/src/bfd/po/bfd.pot +++ b/src/bfd/po/bfd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-07 17:54-0500\n" +"POT-Creation-Date: 2024-01-07 21:12-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -669,8 +669,8 @@ msgstr "" #: elf-m10200.c:412 elf-m10300.c:1512 elf32-arm.c:4225 elf32-avr.c:863 #: elf32-bfin.c:3220 elf32-cr16.c:1484 elf32-cr16c.c:776 elf32-cris.c:1495 -#: elf32-crx.c:914 elf32-d10v.c:537 elf32-epiphany.c:557 elf32-fr30.c:567 -#: elf32-frv.c:4076 elf32-h8300.c:497 elf32-i860.c:1185 elf32-ip2k.c:1472 +#: elf32-crx.c:914 elf32-d10v.c:537 elf32-epiphany.c:557 elf32-fr30.c:569 +#: elf32-frv.c:4077 elf32-h8300.c:497 elf32-i860.c:1185 elf32-ip2k.c:1474 #: elf32-iq2000.c:622 elf32-lm32.c:1160 elf32-m32c.c:474 elf32-m32r.c:3092 #: elf32-m68hc1x.c:1210 elf32-mep.c:535 elf32-metag.c:1992 #: elf32-microblaze.c:1560 elf32-moxie.c:282 elf32-ms1.c:372 elf32-msp430.c:510 @@ -682,7 +682,7 @@ msgstr "" #: elf-m10200.c:416 elf-m10300.c:1516 elf32-arm.c:4229 elf32-avr.c:867 #: elf32-bfin.c:3224 elf32-cr16.c:1488 elf32-cr16c.c:780 elf32-cris.c:1499 -#: elf32-crx.c:918 elf32-d10v.c:541 elf32-fr30.c:571 elf32-frv.c:4080 +#: elf32-crx.c:918 elf32-d10v.c:541 elf32-fr30.c:573 elf32-frv.c:4081 #: elf32-h8300.c:501 elf32-i860.c:1189 elf32-iq2000.c:626 elf32-lm32.c:1164 #: elf32-m32c.c:478 elf32-m32r.c:3096 elf32-m68hc1x.c:1214 elf32-mep.c:539 #: elf32-metag.c:1996 elf32-microblaze.c:1564 elf32-moxie.c:286 @@ -702,8 +702,8 @@ msgstr "" #: elf-m10200.c:424 elf-m10300.c:1524 elf32-arm.c:4237 elf32-avr.c:875 #: elf32-bfin.c:3232 elf32-cr16.c:1496 elf32-cr16c.c:788 elf32-cris.c:1507 -#: elf32-crx.c:926 elf32-d10v.c:549 elf32-epiphany.c:572 elf32-fr30.c:579 -#: elf32-frv.c:4088 elf32-h8300.c:509 elf32-i860.c:1197 elf32-ip2k.c:1487 +#: elf32-crx.c:926 elf32-d10v.c:549 elf32-epiphany.c:572 elf32-fr30.c:581 +#: elf32-frv.c:4089 elf32-h8300.c:509 elf32-i860.c:1197 elf32-ip2k.c:1489 #: elf32-iq2000.c:634 elf32-lm32.c:1172 elf32-m32c.c:486 elf32-m32r.c:3104 #: elf32-m68hc1x.c:1222 elf32-mep.c:547 elf32-metag.c:2004 #: elf32-microblaze.c:1572 elf32-moxie.c:294 elf32-ms1.c:380 elf32-msp430.c:522 @@ -1019,14 +1019,14 @@ msgstr "" msgid "" msgstr "" -#: elf32-arm.c:4921 elf32-i386.c:909 elf32-s390.c:964 elf32-tic6x.c:2812 +#: elf32-arm.c:4921 elf32-i386.c:914 elf32-s390.c:964 elf32-tic6x.c:2812 #: elf32-tilepro.c:1511 elf32-xtensa.c:788 elf64-s390.c:918 elf64-x86-64.c:670 #: elfxx-sparc.c:1023 elfnn-aarch64.c:5082 msgid "%B: bad symbol index: %d" msgstr "" #: elf32-avr.c:871 elf32-bfin.c:3228 elf32-cris.c:1503 elf32-epiphany.c:568 -#: elf32-fr30.c:575 elf32-frv.c:4084 elf32-i860.c:1193 elf32-ip2k.c:1483 +#: elf32-fr30.c:577 elf32-frv.c:4085 elf32-i860.c:1193 elf32-ip2k.c:1485 #: elf32-iq2000.c:630 elf32-m32c.c:482 elf32-mep.c:543 elf32-metag.c:2000 #: elf32-moxie.c:290 elf32-ms1.c:376 elf32-msp430.c:518 elf32-mt.c:399 #: elf32-openrisc.c:393 elf32-or1k.c:1271 elf32-tilepro.c:3674 @@ -1038,12 +1038,12 @@ msgstr "" msgid "relocation should be even number" msgstr "" -#: elf32-bfin.c:1601 elf32-i386.c:3042 elf32-m68k.c:1697 elf32-s390.c:2960 +#: elf32-bfin.c:1601 elf32-i386.c:3047 elf32-m68k.c:1697 elf32-s390.c:2960 #: elf32-xtensa.c:2310 elf64-s390.c:2965 elf64-x86-64.c:2516 elfxx-sparc.c:3149 msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" msgstr "" -#: elf32-bfin.c:1634 elf32-i386.c:3082 elf32-m68k.c:1738 elf32-s390.c:3013 +#: elf32-bfin.c:1634 elf32-i386.c:3085 elf32-m68k.c:1738 elf32-s390.c:3013 #: elf64-s390.c:3016 elf64-x86-64.c:2560 msgid "%B(%A+0x%lx): reloc against `%s': error %d" msgstr "" @@ -1052,7 +1052,7 @@ msgstr "" msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend" msgstr "" -#: elf32-bfin.c:2748 elf32-frv.c:2880 +#: elf32-bfin.c:2748 elf32-frv.c:2881 msgid "relocation references symbol not defined in the module" msgstr "" @@ -1060,11 +1060,11 @@ msgstr "" msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend" msgstr "" -#: elf32-bfin.c:2886 elf32-bfin.c:3009 elf32-frv.c:3615 elf32-frv.c:3728 +#: elf32-bfin.c:2886 elf32-bfin.c:3009 elf32-frv.c:3616 elf32-frv.c:3729 msgid "cannot emit fixups in read-only section" msgstr "" -#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-frv.c:3641 elf32-frv.c:3768 +#: elf32-bfin.c:2917 elf32-bfin.c:3047 elf32-frv.c:3642 elf32-frv.c:3769 #: elf32-lm32.c:1095 msgid "cannot emit dynamic relocations in read-only section" msgstr "" @@ -1081,16 +1081,16 @@ msgstr "" msgid "warning: relocation references a different segment" msgstr "" -#: elf32-bfin.c:4907 elf32-frv.c:6327 +#: elf32-bfin.c:4907 elf32-frv.c:6328 msgid "%B: unsupported relocation type %i" msgstr "" -#: elf32-bfin.c:5034 elf32-frv.c:6719 +#: elf32-bfin.c:5034 elf32-frv.c:6720 #, c-format msgid "%s: cannot link non-fdpic object file into fdpic executable" msgstr "" -#: elf32-bfin.c:5038 elf32-frv.c:6723 +#: elf32-bfin.c:5038 elf32-frv.c:6724 #, c-format msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "" @@ -1186,101 +1186,101 @@ msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "" #. Only if it's not an unresolved symbol. -#: elf32-epiphany.c:564 elf32-ip2k.c:1479 +#: elf32-epiphany.c:564 elf32-ip2k.c:1481 msgid "unsupported relocation between data/insn address spaces" msgstr "" -#: elf32-frv.c:1524 elf32-frv.c:1673 +#: elf32-frv.c:1525 elf32-frv.c:1674 msgid "relocation requires zero addend" msgstr "" -#: elf32-frv.c:2867 +#: elf32-frv.c:2868 msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above" msgstr "" -#: elf32-frv.c:2956 +#: elf32-frv.c:2957 msgid "R_FRV_GETTLSOFF not applied to a call instruction" msgstr "" -#: elf32-frv.c:2998 +#: elf32-frv.c:2999 msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction" msgstr "" -#: elf32-frv.c:3069 +#: elf32-frv.c:3070 msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3106 +#: elf32-frv.c:3107 msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3154 +#: elf32-frv.c:3155 msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction" msgstr "" -#: elf32-frv.c:3238 +#: elf32-frv.c:3239 msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction" msgstr "" -#: elf32-frv.c:3293 +#: elf32-frv.c:3294 msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction" msgstr "" -#: elf32-frv.c:3323 +#: elf32-frv.c:3324 msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3352 +#: elf32-frv.c:3353 msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3383 +#: elf32-frv.c:3384 msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction" msgstr "" -#: elf32-frv.c:3428 +#: elf32-frv.c:3429 msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3455 +#: elf32-frv.c:3456 msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3576 +#: elf32-frv.c:3577 msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend" msgstr "" -#: elf32-frv.c:3686 +#: elf32-frv.c:3687 msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "" -#: elf32-frv.c:3939 elf32-frv.c:4095 +#: elf32-frv.c:3940 elf32-frv.c:4096 msgid "%B(%A+0x%lx): reloc against `%s': %s" msgstr "" -#: elf32-frv.c:3941 elf32-frv.c:3945 +#: elf32-frv.c:3942 elf32-frv.c:3946 msgid "relocation references a different segment" msgstr "" -#: elf32-frv.c:6633 +#: elf32-frv.c:6634 #, c-format msgid "" "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "" -#: elf32-frv.c:6686 elf32-iq2000.c:807 elf32-m32c.c:797 +#: elf32-frv.c:6687 elf32-iq2000.c:806 elf32-m32c.c:797 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "" -#: elf32-frv.c:6698 +#: elf32-frv.c:6699 #, c-format msgid "" "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x" "%lx)" msgstr "" -#: elf32-frv.c:6746 elf32-iq2000.c:844 elf32-m32c.c:833 elf32-ms1.c:594 +#: elf32-frv.c:6747 elf32-iq2000.c:844 elf32-m32c.c:833 elf32-ms1.c:594 #: elf32-mt.c:580 elf32-rl78.c:1069 elf32-rx.c:3040 #, c-format msgid "private flags = 0x%lx:" @@ -1294,35 +1294,35 @@ msgstr "" msgid "%B: cannot create stub entry %s" msgstr "" -#: elf32-hppa.c:833 elf32-hppa.c:3424 +#: elf32-hppa.c:833 elf32-hppa.c:3425 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "" -#: elf32-hppa.c:1230 +#: elf32-hppa.c:1228 msgid "" "%B: relocation %s can not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1425 +#: elf32-hppa.c:1423 #, c-format msgid "Could not find relocation section for %s" msgstr "" -#: elf32-hppa.c:2689 +#: elf32-hppa.c:2690 msgid "%B: duplicate export stub %s" msgstr "" -#: elf32-hppa.c:3279 +#: elf32-hppa.c:3280 msgid "" "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" msgstr "" -#: elf32-hppa.c:3908 +#: elf32-hppa.c:3909 msgid "%B(%A+0x%lx): cannot handle %s for %s" msgstr "" -#: elf32-hppa.c:4210 +#: elf32-hppa.c:4211 msgid ".got section not immediately after .plt section" msgstr "" @@ -1332,21 +1332,21 @@ msgstr "" msgid "%B: invalid relocation type %d" msgstr "" -#: elf32-i386.c:1022 elf32-s390.c:1147 elf32-sh.c:6423 elf32-tilepro.c:1627 +#: elf32-i386.c:1027 elf32-s390.c:1147 elf32-sh.c:6423 elf32-tilepro.c:1627 #: elf64-s390.c:1109 elfxx-sparc.c:1153 msgid "%B: `%s' accessed both as normal and thread local symbol" msgstr "" -#: elf32-i386.c:1137 elf32-or1k.c:1646 elf32-s390.c:1256 elf64-ppc.c:4704 +#: elf32-i386.c:1142 elf32-or1k.c:1646 elf32-s390.c:1256 elf64-ppc.c:4704 #: elf64-s390.c:1221 elf64-x86-64.c:914 msgid "%B: bad relocation section name `%s'" msgstr "" -#: elf32-i386.c:2149 elf32-tilepro.c:2873 elfnn-aarch64.c:4111 +#: elf32-i386.c:2154 elf32-tilepro.c:2873 elfnn-aarch64.c:4111 msgid "%B: unrecognized relocation (0x%x) in section `%A'" msgstr "" -#: elf32-i386.c:2412 +#: elf32-i386.c:2417 msgid "" "%B: relocation R_386_GOTOFF against protected function `%s' can not be used " "when making a shared object" @@ -1371,9 +1371,9 @@ msgstr "" msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)." msgstr "" -#: elf32-iq2000.c:820 elf32-m32c.c:809 +#: elf32-iq2000.c:819 #, c-format -msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" +msgid "%s: uses diff. e_flags (0x%lx) fields than prev. modules (0x%lx)" msgstr "" #: elf32-lm32.c:698 elf32-nios2.c:1117 @@ -1388,6 +1388,11 @@ msgstr "" msgid "internal error: addend should be zero for R_LM32_16_GOT" msgstr "" +#: elf32-m32c.c:809 +#, c-format +msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" +msgstr "" + #: elf32-m32r.c:1423 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr ""