Import binutils-2.34
2020-01-18 Nick Clifton <nickc@redhat.com> Binutils 2.34 branch created. 2020-01-18 Nick Clifton <nickc@redhat.com> Synchronize top level configure files with master version: 2020-01-01 Ben Elliston <bje@gnu.org> * config.guess: Update copyright years. * config.sub: Likewise. 2019-12-21 Ben Elliston <bje@gnu.org> * config.guess (set_cc_for_build): Prevent multiple calls by checking if $tmp is already set. We can't check CC_FOR_BUILD as the user may set it externally. Thanks to Torbjörn Granlund for the bug report. 2019-12-21 Torbjörn Granlund <tg@gmplib.org> * config.guess (alpha:Linux:*:*): Guard against missing /proc/cpuinfo by redirecting standard error to /dev/null. 2019-09-12 Daniel Bittman <danielbittman1@gmail.com> * config.guess (*:Twizzler:*:*): New. * config.sub (-twizzler*): New. 2019-07-24 Ben Elliston <bje@gnu.org> * config.guess (mips:OSF1:*.*): Whitespace cleanup. 2019-06-30 Ben Elliston <bje@gnu.org> * config.sub (case $os): Match nsk* and powerunix. Don't later match nsk* and set os=nsk which removes the OS version number. 2019-06-30 Ben Elliston <bje@gnu.org> * config.sub: Recognise os108*. 2019-06-26 Ben Elliston <bje@gnu.org> * config.sub (hp300): Set $os to hpux. 2019-06-26 Ben Elliston <bje@gnu.org> * config.sub (vsta): Move into alphabetical order. 2019-06-10 Ben Elliston <bje@gnu.org> * config.guess (*:OS108:*:*): Recognise new OS. 2019-05-28 Ben Elliston <bje@gnu.org> * config.guess (*:Darwin:*:*): Run xcode-select to determine if a system compiler is installed. If not, do not run set_cc_for_build, as the default cc will open a dialog box asking to install Xcode. If no C compiler is available, guess based on uname -p and uname -m. 2019-05-28 Ben Elliston <bje@gnu.org> * config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR. 2020-01-17 Simon Marchi <simon.marchi@efficios.com> * Makefile.def: Add dependencies of all-gdbsupport on all-bfd. * Makefile.in: Re-generate. 2020-01-14 Tom Tromey <tom@tromey.com> * src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport. * MAINTAINERS: Add gdbsupport. * configure: Rebuild. * configure.ac (configdirs): Add gdbsupport. * gdbsupport: New directory, move from gdb/gdbsupport. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. 2020-01-09 Aaron Merey <amerey@redhat.com> * config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD. Adds new configure option --with-debuginfod. * configure: Regenerate. * configure.ac: Call AC_DEBUGINFOD. 2019-12-26 Christian Biesinger <cbiesinger@google.com> * .gitignore: Add perf.data and perf.data.old. 2019-10-17 Sergio Durigan Junior <sergiodj@redhat.com> * src-release.sh (GDB_SUPPORT_DIRS): Add libctf. 2019-10-17 Alan Modra <amodra@gmail.com> PR 29 * src-release.sh (getver): Replace "head -1" with "head -n 1". 2019-07-30 Nick Alcock <nick.alcock@oracle.com> * Makefile.def (host_modules): libctf is no longer no_install. * Makefile.in: Regenerated. 2019-07-13 Nick Alcock <nick.alcock@oracle.com> * Makefile.def (dependencies): all-ld depends on all-libctf. * Makefile.in: Regenerated. 2019-09-09 Phil Blundell <pb@pbcl.net> binutils 2.33 branch created 2019-08-19 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac: Add --with-static-standard-libraries. 2019-08-09 Nick Clifton <nickc@redhat.com> * libiberty: Sync with gcc. Bring in: 2019-08-08 Martin Liska <mliska@suse.cz> PR bootstrap/91352 * lrealpath.c (is_valid_fd): New function. 2019-07-24 Martin Liska <mliska@suse.cz> PR lto/91228 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Find first '\0' starting from gnu_lto + 1. 2019-07-12 Ren Kimura <rkx1209dev@gmail.com> * simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx. This fixes a Bug 90924. 2019-07-22 Martin Liska <mliska@suse.cz> * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Do not search for gnu_lto_v1, but search for first '\0'. 2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs> * cplus-dem.c: Include rust-demangle.h. * rust-demangle.c: Include rust-demangle.h. * rust-demangle.h: New file. 2019-05-31 Michael Forney <mforney@mforney.org> * cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero. 2019-04-30 Ben L <bobsayshilol@live.co.uk> * d-demangle.c (dlang_parse_assocarray): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_tuple): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_structlit): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_integer): Fix stack underflow. * testsuite/d-demangle-expected: Add testcase. * cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'. * testsuite/demangle-expected: Add testcase. * cp-demangle.c (d_encoding): Guard against NULL return values from d_right (dc). * testsuite/demangle-expected: Add testcase. 2019-04-29 Ben L <bobsayshilol@live.co.uk> * cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid. * testsuite/demangle-expected: Add testcase. 2019-04-10 Nick Clifton <nickc@redhat.com> PR 89394 * cp-demangle.c (cplus_demangle_fill_name): Reject negative lengths. (d_count_templates_scopes): Replace num_templates and num_scopes parameters with a struct d_print_info pointer parameter. Adjust body of the function accordingly. Add recursion counter and check that the recursion limit is not reached. (d_print_init): Pass dpi parameter to d_count_templates_scopes. Reset recursion counter afterwards, unless the recursion limit was reached. 2019-07-13 Joel Brobecker <brobecker@adacore.com> * src-release (getver): If $tool/gdbsupport/create-version.sh exists, use that to determine the version number. 2019-06-21 Andreas Schwab <schwab@linux-m68k.org> * src-release.sh (GDB_SUPPORT_DIRS): Add gnulib. 2019-06-14 Tom Tromey <tom@tromey.com> * MAINTAINERS: Add gnulib. * gnulib: New directory, move from gdb/gnulib. * configure.ac (host_libs): Add gnulib. * configure: Rebuild. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. 2019-06-03 Nick Clifton <nickc@redhat.com> Revert: 2019-05-29 Nick Clifton <nickc@redhat.com> * configure.ac (noconfigdirs): Add libctf if the target does not use the ELF file format. * configure: Regenerate. 2019-05-29 Nick Clifton <nickc@redhat.com> * src-release.sh (do_proto_toplev): Add libctf to list of directories that can be disabled. 2019-05-29 Nick Clifton <nickc@redhat.com> * configure.ac (noconfigdirs): Add libctf if the target does not use the ELF file format. * configure: Regenerate. 2019-05-28 Nick Alcock <nick.alcock@oracle.com> * Makefile.def (dependencies): configure-libctf depends on all-bfd and all its deps. * Makefile.in: Regenerated. 2019-05-28 Nick Alcock <nick.alcock@oracle.com> * MAINTAINERS: Add libctf. 2019-05-28 Nick Alcock <nick.alcock@oracle.com> * Makefile.def (host_modules): Add libctf. * Makefile.def (dependencies): Likewise. libctf depends on zlib, libiberty, and bfd. * Makefile.in: Regenerated. * configure.ac (host_libs): Add libctf. * configure: Regenerated. 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com> * config.guess: Synchronize with config project master sources. * config.sub: Likewise. * readline/support/config.guess: Likewise. * readline/support/config.sub: Likewise. 2019-04-10 Nick Clifton <nickc@redhat.com> * libiberty: Sync with gcc. Bring in: 2019-04-10 Nick Clifton <nickc@redhat.com> PR 89394 * cp-demangle.c (cplus_demangle_fill_name): Reject negative lengths. (d_count_templates_scopes): Replace num_templates and num_scopes parameters with a struct d_print_info pointer parameter. Adjust body of the function accordingly. Add recursion counter and check that the recursion limit is not reached. (d_print_init): Pass dpi parameter to d_count_templates_scopes. Reset recursion counter afterwards, unless the recursion limit was reached. 2018-06-24 Nick Clifton <nickc@redhat.com> 2.32 branch created. 2019-01-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Merge from GCC: PR target/88535 * config.guess: Import upstream version 2019-01-03. * config.sub: Import upstream version 2019-01-01. 2019-01-10 Nick Clifton <nickc@redhat.com> * libiberty: Sync with gcc. Bring in: 2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 * cp-demangle.c: Mechanically replace "can not" with "cannot". * floatformat.c: Likewise. * strerror.c: Likewise. 2018-12-22 Jason Merrill <jason@redhat.com> Remove support for demangling GCC 2.x era mangling schemes. * cplus-dem.c: Remove cplus_mangle_opname, cplus_demangle_opname, internal_cplus_demangle, and all subroutines. (libiberty_demanglers): Remove entries for ancient GNU (pre-3.0), Lucid, ARM, HP, and EDG demangling styles. (cplus_demangle): Remove 'work' variable. Don't call internal_cplus_demangle. 2019-01-03 Дилян Палаузов <dilyan.palauzov@aegee.org> * configure.ac: Don't configure readline if --with-system-readline is used. * configure: Re-generate. 2018-10-31 Joseph Myers <joseph@codesourcery.com> Merge from GCC: PR bootstrap/82856 * multilib.am: New file. From automake. 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com> * src-release.sh (GDB_SUPPORT_DIRS): Add "contrib". 2018-07-16 Nick Clifton <nickc@redhat.com> @ -20,6 +338,18 @@ * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. 2018-06-29 Alexandre Oliva <oliva@adacore.com> * configure.ac: Introduce support for @unless/@endunless. * Makefile.tpl (dep-kind): Rewrite with cond; return postbootstrap in some cases. (make-postboot-dep, postboot-targets): New. (dependencies): Do not output postbootstrap dependencies at first. Output non-target ones changed for configure to depend on stage_last @if gcc-bootstrap, and the original deps @unless gcc-bootstrap. * configure.in, Makefile.in: Rebuilt. 2018-06-24 Nick Clifton <nickc@redhat.com> * configure: Regenerate.
This commit is contained in:
parent
c29d31acde
commit
6f4ced0b31
340
external/gpl3/binutils/dist/ChangeLog
vendored
340
external/gpl3/binutils/dist/ChangeLog
vendored
@ -1,11 +1,329 @@
|
||||
2018-07-18 Nick Clifton <nickc@redhat.com>
|
||||
2020-01-18 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
2.31.1 Release point.
|
||||
Binutils 2.34 branch created.
|
||||
|
||||
2018-07-18 Nick Clifton <nickc@redhat.com>
|
||||
2020-01-18 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* (DEVO_SUPPORT): Fix typo in previous delta.
|
||||
(do_proto_toplev): Add --quiet option to configure command line.
|
||||
Synchronize top level configure files with master version:
|
||||
|
||||
2020-01-01 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess: Update copyright years.
|
||||
* config.sub: Likewise.
|
||||
|
||||
2019-12-21 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess (set_cc_for_build): Prevent multiple calls by
|
||||
checking if $tmp is already set. We can't check CC_FOR_BUILD as
|
||||
the user may set it externally. Thanks to Torbjörn Granlund for
|
||||
the bug report.
|
||||
|
||||
2019-12-21 Torbjörn Granlund <tg@gmplib.org>
|
||||
|
||||
* config.guess (alpha:Linux:*:*): Guard against missing
|
||||
/proc/cpuinfo by redirecting standard error to /dev/null.
|
||||
|
||||
2019-09-12 Daniel Bittman <danielbittman1@gmail.com>
|
||||
|
||||
* config.guess (*:Twizzler:*:*): New.
|
||||
* config.sub (-twizzler*): New.
|
||||
|
||||
2019-07-24 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess (mips:OSF1:*.*): Whitespace cleanup.
|
||||
|
||||
2019-06-30 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.sub (case $os): Match nsk* and powerunix. Don't later
|
||||
match nsk* and set os=nsk which removes the OS version number.
|
||||
|
||||
2019-06-30 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.sub: Recognise os108*.
|
||||
|
||||
2019-06-26 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.sub (hp300): Set $os to hpux.
|
||||
|
||||
2019-06-26 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.sub (vsta): Move into alphabetical order.
|
||||
|
||||
2019-06-10 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess (*:OS108:*:*): Recognise new OS.
|
||||
|
||||
2019-05-28 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
|
||||
system compiler is installed. If not, do not run set_cc_for_build,
|
||||
as the default cc will open a dialog box asking to install
|
||||
Xcode. If no C compiler is available, guess based on uname -p and
|
||||
uname -m.
|
||||
|
||||
2019-05-28 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR.
|
||||
|
||||
2020-01-17 Simon Marchi <simon.marchi@efficios.com>
|
||||
|
||||
* Makefile.def: Add dependencies of all-gdbsupport on all-bfd.
|
||||
* Makefile.in: Re-generate.
|
||||
|
||||
2020-01-14 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport.
|
||||
* MAINTAINERS: Add gdbsupport.
|
||||
* configure: Rebuild.
|
||||
* configure.ac (configdirs): Add gdbsupport.
|
||||
* gdbsupport: New directory, move from gdb/gdbsupport.
|
||||
* Makefile.def (host_modules, dependencies): Add gnulib.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
2020-01-09 Aaron Merey <amerey@redhat.com>
|
||||
|
||||
* config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD. Adds
|
||||
new configure option --with-debuginfod.
|
||||
* configure: Regenerate.
|
||||
* configure.ac: Call AC_DEBUGINFOD.
|
||||
|
||||
2019-12-26 Christian Biesinger <cbiesinger@google.com>
|
||||
|
||||
* .gitignore: Add perf.data and perf.data.old.
|
||||
|
||||
2019-10-17 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
* src-release.sh (GDB_SUPPORT_DIRS): Add libctf.
|
||||
|
||||
2019-10-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 29
|
||||
* src-release.sh (getver): Replace "head -1" with "head -n 1".
|
||||
|
||||
2019-07-30 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* Makefile.def (host_modules): libctf is no longer no_install.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* Makefile.def (dependencies): all-ld depends on all-libctf.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
2019-09-09 Phil Blundell <pb@pbcl.net>
|
||||
|
||||
binutils 2.33 branch created
|
||||
|
||||
2019-08-19 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* configure: Rebuild.
|
||||
* configure.ac: Add --with-static-standard-libraries.
|
||||
|
||||
2019-08-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* libiberty: Sync with gcc. Bring in:
|
||||
2019-08-08 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR bootstrap/91352
|
||||
* lrealpath.c (is_valid_fd): New function.
|
||||
|
||||
2019-07-24 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR lto/91228
|
||||
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
|
||||
Find first '\0' starting from gnu_lto + 1.
|
||||
|
||||
2019-07-12 Ren Kimura <rkx1209dev@gmail.com>
|
||||
|
||||
* simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx.
|
||||
This fixes a Bug 90924.
|
||||
|
||||
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
|
||||
Do not search for gnu_lto_v1, but search for first '\0'.
|
||||
|
||||
2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs>
|
||||
|
||||
* cplus-dem.c: Include rust-demangle.h.
|
||||
* rust-demangle.c: Include rust-demangle.h.
|
||||
* rust-demangle.h: New file.
|
||||
|
||||
2019-05-31 Michael Forney <mforney@mforney.org>
|
||||
|
||||
* cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__
|
||||
is non-zero.
|
||||
|
||||
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
||||
|
||||
* d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* d-demangle.c (dlang_parse_tuple): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* d-demangle.c (dlang_parse_integer): Fix stack underflow.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
|
||||
* testsuite/demangle-expected: Add testcase.
|
||||
|
||||
* cp-demangle.c (d_encoding): Guard against NULL return values from
|
||||
d_right (dc).
|
||||
* testsuite/demangle-expected: Add testcase.
|
||||
|
||||
2019-04-29 Ben L <bobsayshilol@live.co.uk>
|
||||
|
||||
* cp-demangle.c (d_expression_1): Don't peek ahead unless the current
|
||||
char is valid.
|
||||
* testsuite/demangle-expected: Add testcase.
|
||||
|
||||
2019-04-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 89394
|
||||
* cp-demangle.c (cplus_demangle_fill_name): Reject negative
|
||||
lengths.
|
||||
(d_count_templates_scopes): Replace num_templates and num_scopes
|
||||
parameters with a struct d_print_info pointer parameter. Adjust
|
||||
body of the function accordingly. Add recursion counter and check
|
||||
that the recursion limit is not reached.
|
||||
(d_print_init): Pass dpi parameter to d_count_templates_scopes.
|
||||
Reset recursion counter afterwards, unless the recursion limit was
|
||||
reached.
|
||||
|
||||
2019-07-13 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* src-release (getver): If $tool/gdbsupport/create-version.sh
|
||||
exists, use that to determine the version number.
|
||||
|
||||
2019-06-21 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src-release.sh (GDB_SUPPORT_DIRS): Add gnulib.
|
||||
|
||||
2019-06-14 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* MAINTAINERS: Add gnulib.
|
||||
* gnulib: New directory, move from gdb/gnulib.
|
||||
* configure.ac (host_libs): Add gnulib.
|
||||
* configure: Rebuild.
|
||||
* Makefile.def (host_modules, dependencies): Add gnulib.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
2019-06-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
Revert:
|
||||
2019-05-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* configure.ac (noconfigdirs): Add libctf if the target does not use
|
||||
the ELF file format.
|
||||
* configure: Regenerate.
|
||||
|
||||
2019-05-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* src-release.sh (do_proto_toplev): Add libctf to list of
|
||||
directories that can be disabled.
|
||||
|
||||
2019-05-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* configure.ac (noconfigdirs): Add libctf if the target does not use
|
||||
the ELF file format.
|
||||
* configure: Regenerate.
|
||||
|
||||
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* Makefile.def (dependencies): configure-libctf depends on all-bfd
|
||||
and all its deps.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* MAINTAINERS: Add libctf.
|
||||
|
||||
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* Makefile.def (host_modules): Add libctf.
|
||||
* Makefile.def (dependencies): Likewise.
|
||||
libctf depends on zlib, libiberty, and bfd.
|
||||
* Makefile.in: Regenerated.
|
||||
* configure.ac (host_libs): Add libctf.
|
||||
* configure: Regenerated.
|
||||
|
||||
2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||
|
||||
* config.guess: Synchronize with config project master sources.
|
||||
* config.sub: Likewise.
|
||||
* readline/support/config.guess: Likewise.
|
||||
* readline/support/config.sub: Likewise.
|
||||
|
||||
2019-04-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* libiberty: Sync with gcc. Bring in:
|
||||
2019-04-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 89394
|
||||
* cp-demangle.c (cplus_demangle_fill_name): Reject negative
|
||||
lengths.
|
||||
(d_count_templates_scopes): Replace num_templates and num_scopes
|
||||
parameters with a struct d_print_info pointer parameter. Adjust
|
||||
body of the function accordingly. Add recursion counter and check
|
||||
that the recursion limit is not reached.
|
||||
(d_print_init): Pass dpi parameter to d_count_templates_scopes.
|
||||
Reset recursion counter afterwards, unless the recursion limit was
|
||||
reached.
|
||||
|
||||
2018-06-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
2.32 branch created.
|
||||
|
||||
2019-01-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
Merge from GCC:
|
||||
PR target/88535
|
||||
* config.guess: Import upstream version 2019-01-03.
|
||||
* config.sub: Import upstream version 2019-01-01.
|
||||
|
||||
2019-01-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* libiberty: Sync with gcc. Bring in:
|
||||
2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
PR other/16615
|
||||
|
||||
* cp-demangle.c: Mechanically replace "can not" with "cannot".
|
||||
* floatformat.c: Likewise.
|
||||
* strerror.c: Likewise.
|
||||
|
||||
2018-12-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
Remove support for demangling GCC 2.x era mangling schemes.
|
||||
* cplus-dem.c: Remove cplus_mangle_opname, cplus_demangle_opname,
|
||||
internal_cplus_demangle, and all subroutines.
|
||||
(libiberty_demanglers): Remove entries for ancient GNU (pre-3.0),
|
||||
Lucid, ARM, HP, and EDG demangling styles.
|
||||
(cplus_demangle): Remove 'work' variable. Don't call
|
||||
internal_cplus_demangle.
|
||||
|
||||
2019-01-03 Дилян Палаузов <dilyan.palauzov@aegee.org>
|
||||
|
||||
* configure.ac: Don't configure readline if --with-system-readline is
|
||||
used.
|
||||
* configure: Re-generate.
|
||||
|
||||
2018-10-31 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
Merge from GCC:
|
||||
PR bootstrap/82856
|
||||
* multilib.am: New file. From automake.
|
||||
|
||||
2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
* src-release.sh (GDB_SUPPORT_DIRS): Add "contrib".
|
||||
|
||||
2018-07-16 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
@ -20,6 +338,18 @@
|
||||
* config.guess: Sync with upstream version 2018-06-26.
|
||||
* config.sub: Sync with upstream version 2018-07-02.
|
||||
|
||||
2018-06-29 Alexandre Oliva <oliva@adacore.com>
|
||||
|
||||
* configure.ac: Introduce support for @unless/@endunless.
|
||||
* Makefile.tpl (dep-kind): Rewrite with cond; return
|
||||
postbootstrap in some cases.
|
||||
(make-postboot-dep, postboot-targets): New.
|
||||
(dependencies): Do not output postbootstrap dependencies at
|
||||
first. Output non-target ones changed for configure to depend
|
||||
on stage_last @if gcc-bootstrap, and the original deps @unless
|
||||
gcc-bootstrap.
|
||||
* configure.in, Makefile.in: Rebuilt.
|
||||
|
||||
2018-06-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
4
external/gpl3/binutils/dist/MAINTAINERS
vendored
4
external/gpl3/binutils/dist/MAINTAINERS
vendored
@ -14,7 +14,7 @@ Makefile.*; configure; configure.ac; src-release
|
||||
gdb-patches@sourceware.org
|
||||
|
||||
bfd/; binutils/; elfcpp/; gas/; gold/; gprof/; ld/; opcodes/; cpu/;
|
||||
BFD's part of include/
|
||||
libctf/; BFD's and libctf's parts of include/
|
||||
|
||||
binutils: http://sourceware.org/binutils/
|
||||
Patches to binutils@sourceware.org.
|
||||
@ -41,7 +41,7 @@ config.guess; config.sub; readline/support/config.{sub,guess}
|
||||
depcomp; mkinstalldirs
|
||||
Send bug reports and patches to bug-automake@gnu.org.
|
||||
|
||||
gdb/; readline/; sim/; GDB's part of include/
|
||||
gdb/; gdbsupport/; gnulib/; readline/; sim/; GDB's part of include/
|
||||
GDB: http://www.gnu.org/software/gdb/
|
||||
Patches to gdb-patches@sourceware.org.
|
||||
See also gdb/MAINTAINERS and sim/MAINTAINERS.
|
||||
|
24
external/gpl3/binutils/dist/Makefile.def
vendored
24
external/gpl3/binutils/dist/Makefile.def
vendored
@ -112,6 +112,8 @@ host_modules= { module= texinfo; no_install= true; };
|
||||
host_modules= { module= zlib; no_install=true; no_check=true;
|
||||
bootstrap=true;
|
||||
extra_configure_flags='@extra_host_zlib_configure_flags@';};
|
||||
host_modules= { module= gnulib; };
|
||||
host_modules= { module= gdbsupport; };
|
||||
host_modules= { module= gdb; };
|
||||
host_modules= { module= expect; };
|
||||
host_modules= { module= guile; };
|
||||
@ -128,6 +130,8 @@ host_modules= { module= lto-plugin; bootstrap=true;
|
||||
extra_make_flags='@extra_linker_plugin_flags@'; };
|
||||
host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
|
||||
host_modules= { module= gotools; };
|
||||
host_modules= { module= libctf; no_check=true;
|
||||
bootstrap=true; };
|
||||
|
||||
target_modules = { module= libstdc++-v3;
|
||||
bootstrap=true;
|
||||
@ -388,17 +392,22 @@ dependencies = { module=all-intl; on=all-libiconv; };
|
||||
dependencies = { module=configure-gdb; on=all-intl; };
|
||||
dependencies = { module=configure-gdb; on=configure-sim; };
|
||||
dependencies = { module=configure-gdb; on=all-bfd; };
|
||||
dependencies = { module=configure-gdb; on=all-gnulib; };
|
||||
dependencies = { module=configure-gdb; on=all-gdbsupport; };
|
||||
// Depend on all-libiconv so that configure checks for iconv
|
||||
// functions will work.
|
||||
dependencies = { module=configure-gdb; on=all-libiconv; };
|
||||
dependencies = { module=all-gdb; on=all-libiberty; };
|
||||
dependencies = { module=all-gdb; on=all-libiconv; };
|
||||
dependencies = { module=all-gdb; on=all-gnulib; };
|
||||
dependencies = { module=all-gdb; on=all-gdbsupport; };
|
||||
dependencies = { module=all-gdb; on=all-opcodes; };
|
||||
dependencies = { module=all-gdb; on=all-readline; };
|
||||
dependencies = { module=all-gdb; on=all-build-bison; };
|
||||
dependencies = { module=all-gdb; on=all-sim; };
|
||||
dependencies = { module=all-gdb; on=all-libdecnumber; };
|
||||
dependencies = { module=all-gdb; on=all-libtermcap; };
|
||||
dependencies = { module=all-gdb; on=all-libctf; };
|
||||
|
||||
dependencies = { module=configure-libgui; on=configure-tcl; };
|
||||
dependencies = { module=configure-libgui; on=configure-tk; };
|
||||
@ -406,6 +415,11 @@ dependencies = { module=all-libgui; on=all-tcl; };
|
||||
dependencies = { module=all-libgui; on=all-tk; };
|
||||
dependencies = { module=all-libgui; on=all-itcl; };
|
||||
|
||||
dependencies = { module=configure-gdbsupport; on=configure-bfd; };
|
||||
dependencies = { module=configure-gdbsupport; on=configure-gnulib; };
|
||||
dependencies = { module=all-gdbsupport; on=all-bfd; };
|
||||
dependencies = { module=all-gdbsupport; on=all-gnulib; };
|
||||
|
||||
// Host modules specific to binutils.
|
||||
dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
|
||||
dependencies = { module=configure-bfd; on=configure-intl; };
|
||||
@ -426,6 +440,8 @@ dependencies = { module=all-binutils; on=all-build-flex; };
|
||||
dependencies = { module=all-binutils; on=all-build-bison; };
|
||||
dependencies = { module=all-binutils; on=all-intl; };
|
||||
dependencies = { module=all-binutils; on=all-gas; };
|
||||
dependencies = { module=all-binutils; on=all-libctf; };
|
||||
dependencies = { module=all-ld; on=all-libctf; };
|
||||
|
||||
// We put install-opcodes before install-binutils because the installed
|
||||
// binutils might be on PATH, and they might need the shared opcodes
|
||||
@ -516,6 +532,14 @@ dependencies = { module=all-sim; on=configure-gdb; };
|
||||
dependencies = { module=all-fastjar; on=all-zlib; };
|
||||
dependencies = { module=all-fastjar; on=all-build-texinfo; };
|
||||
dependencies = { module=all-fastjar; on=all-libiberty; };
|
||||
dependencies = { module=all-libctf; on=all-libiberty; hard=true; };
|
||||
dependencies = { module=all-libctf; on=all-bfd; };
|
||||
dependencies = { module=all-libctf; on=all-zlib; };
|
||||
// So that checking for ELF support in BFD from libctf configure is possible.
|
||||
dependencies = { module=configure-libctf; on=all-bfd; };
|
||||
dependencies = { module=configure-libctf; on=all-intl; };
|
||||
dependencies = { module=configure-libctf; on=all-zlib; };
|
||||
dependencies = { module=configure-libctf; on=all-libiconv; };
|
||||
|
||||
// Warning, these are not well tested.
|
||||
dependencies = { module=all-bison; on=all-intl; };
|
||||
|
2149
external/gpl3/binutils/dist/Makefile.in
vendored
2149
external/gpl3/binutils/dist/Makefile.in
vendored
File diff suppressed because it is too large
Load Diff
78
external/gpl3/binutils/dist/Makefile.tpl
vendored
78
external/gpl3/binutils/dist/Makefile.tpl
vendored
@ -1818,25 +1818,46 @@ configure-target-[+module+]: maybe-all-gcc[+
|
||||
(define dep-maybe (lambda ()
|
||||
(if (exist? "hard") "" "maybe-")))
|
||||
|
||||
;; dep-kind returns "normal" if the dependency is on an "install" target,
|
||||
;; or if either module is not bootstrapped. It returns "bootstrap" for
|
||||
;; configure or build dependencies between bootstrapped modules; it returns
|
||||
;; "prebootstrap" for configure or build dependencies of bootstrapped
|
||||
;; modules on a build module (e.g. all-gcc on all-build-bison). All this
|
||||
;; is only necessary for host modules.
|
||||
;; dep-kind returns returns "prebootstrap" for configure or build
|
||||
;; dependencies of bootstrapped modules on a build module
|
||||
;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
|
||||
;; on an "install" target, or if the dependence module is not
|
||||
;; bootstrapped; otherwise, it returns "bootstrap" or
|
||||
;; "postbootstrap" depending on whether the dependent module is
|
||||
;; bootstrapped. All this is only necessary for host and target
|
||||
;; modules. It might seem like, in order to avoid build races, we
|
||||
;; might need more elaborate detection between prebootstrap and
|
||||
;; postbootstrap modules, but there are no host prebootstrap
|
||||
;; modules. If there were any non-bootstrap host modules that
|
||||
;; bootstrap modules depended on, we'd get unsatisfied per-stage
|
||||
;; dependencies on them, which would be immediately noticed.
|
||||
(define dep-kind (lambda ()
|
||||
(if (and (hash-ref boot-modules (dep-module "module"))
|
||||
(=* (dep-module "on") "build-"))
|
||||
"prebootstrap"
|
||||
(cond
|
||||
((and (hash-ref boot-modules (dep-module "module"))
|
||||
(=* (dep-module "on") "build-"))
|
||||
"prebootstrap")
|
||||
|
||||
(if (or (= (dep-subtarget "on") "install-")
|
||||
(not (hash-ref boot-modules (dep-module "module")))
|
||||
(not (hash-ref boot-modules (dep-module "on"))))
|
||||
"normal"
|
||||
"bootstrap"))))
|
||||
((or (= (dep-subtarget "on") "install-")
|
||||
(not (hash-ref boot-modules (dep-module "on"))))
|
||||
"normal")
|
||||
|
||||
((hash-ref boot-modules (dep-module "module"))
|
||||
"bootstrap")
|
||||
|
||||
(1 "postbootstrap"))))
|
||||
|
||||
(define make-postboot-dep (lambda ()
|
||||
(let ((target (dep-module "module")) (dep "stage_last"))
|
||||
(unless (= (hash-ref postboot-targets target) dep)
|
||||
(hash-create-handle! postboot-targets target dep)
|
||||
;; All non-bootstrap modules' configure target already
|
||||
;; depend on dep.
|
||||
(unless (=* target "target-")
|
||||
(string-append "configure-" target ": " dep "\n"))))))
|
||||
|
||||
;; We now build the hash table that is used by dep-kind.
|
||||
(define boot-modules (make-hash-table 113))
|
||||
(define postboot-targets (make-hash-table 113))
|
||||
+]
|
||||
|
||||
[+ FOR host_modules +][+
|
||||
@ -1853,18 +1874,23 @@ configure-target-[+module+]: maybe-all-gcc[+
|
||||
# to check for bootstrap/prebootstrap dependencies. To resolve
|
||||
# prebootstrap dependencies, prebootstrap modules are gathered in
|
||||
# a hash table.
|
||||
[+ FOR dependencies +][+ (make-dep "" "") +]
|
||||
[+ CASE (dep-kind) +]
|
||||
[+ == "prebootstrap"
|
||||
+][+ FOR bootstrap_stage +]
|
||||
[+ (make-dep (dep-stage) "") +][+
|
||||
ENDFOR bootstrap_stage +]
|
||||
[+ == "bootstrap"
|
||||
+][+ FOR bootstrap_stage +]
|
||||
[+ (make-dep (dep-stage) (dep-stage)) +][+
|
||||
ENDFOR bootstrap_stage +]
|
||||
[+ ESAC +][+
|
||||
ENDFOR dependencies +]
|
||||
[+ FOR dependencies +][+ CASE (dep-kind) +]
|
||||
[+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
|
||||
[+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +]
|
||||
[+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
|
||||
[+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +]
|
||||
[+ == "normal" +][+ (make-dep "" "") +]
|
||||
[+ ESAC +][+ ENDFOR dependencies +]
|
||||
|
||||
@if gcc-bootstrap
|
||||
[+ FOR dependencies +][+ CASE (dep-kind) +]
|
||||
[+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
|
||||
ENDFOR dependencies +]@endif gcc-bootstrap
|
||||
|
||||
@unless gcc-bootstrap
|
||||
[+ FOR dependencies +][+ CASE (dep-kind) +]
|
||||
[+ == "postbootstrap" +][+ (make-dep "" "") +]
|
||||
[+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap
|
||||
|
||||
# Dependencies for target modules on other target modules are
|
||||
# described by lang_env_dependencies; the defaults apply to anything
|
||||
|
4949
external/gpl3/binutils/dist/bfd/ChangeLog-2018
vendored
Normal file
4949
external/gpl3/binutils/dist/bfd/ChangeLog-2018
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3185
external/gpl3/binutils/dist/bfd/ChangeLog-2019
vendored
Normal file
3185
external/gpl3/binutils/dist/bfd/ChangeLog-2019
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
external/gpl3/binutils/dist/bfd/MAINTAINERS
vendored
2
external/gpl3/binutils/dist/bfd/MAINTAINERS
vendored
@ -1,6 +1,6 @@
|
||||
See ../binutils/MAINTAINERS
|
||||
|
||||
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
2
external/gpl3/binutils/dist/bfd/PORTING
vendored
2
external/gpl3/binutils/dist/bfd/PORTING
vendored
@ -82,7 +82,7 @@ TARGETNAME
|
||||
The name of the target, for run-time lookups.
|
||||
Usually "a.out-<target>"
|
||||
|
||||
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
2
external/gpl3/binutils/dist/bfd/README
vendored
2
external/gpl3/binutils/dist/bfd/README
vendored
@ -48,7 +48,7 @@ gcc manual.
|
||||
Bug reports without patches will be remembered, but they may never get
|
||||
fixed until somebody volunteers to fix them.
|
||||
|
||||
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
2
external/gpl3/binutils/dist/bfd/TODO
vendored
2
external/gpl3/binutils/dist/bfd/TODO
vendored
@ -20,7 +20,7 @@ Things that still need to be done: -*- Text -*-
|
||||
|
||||
o - upgrade the reloc handling as per Steve's suggestion.
|
||||
|
||||
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
2
external/gpl3/binutils/dist/bfd/acinclude.m4
vendored
2
external/gpl3/binutils/dist/bfd/acinclude.m4
vendored
@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This file is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* BFD back-end for AIX on PS/2 core files.
|
||||
This was based on trad-core.c, which was written by John Gilmore of
|
||||
Cygnus Support.
|
||||
Copyright (C) 1988-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
Written by Minh Tran-Le <TRANLE@INTELLICORP.COM>.
|
||||
Converted to back end form by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* IBM RS/6000 "XCOFF" back-end for BFD.
|
||||
Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
Written by Tom Rix
|
||||
Contributed by Red Hat Inc.
|
||||
|
||||
|
6
external/gpl3/binutils/dist/bfd/aout-cris.c
vendored
6
external/gpl3/binutils/dist/bfd/aout-cris.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD backend for CRIS a.out binaries.
|
||||
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
Contributed by Axis Communications AB.
|
||||
Written by Hans-Peter Nilsson.
|
||||
|
||||
@ -169,14 +169,14 @@ MY (swap_ext_reloc_out) (bfd *abfd,
|
||||
from the abs section, or as a symbol which has an abs value.
|
||||
check for that here. */
|
||||
|
||||
if (bfd_is_abs_section (bfd_get_section (sym)))
|
||||
if (bfd_is_abs_section (bfd_asymbol_section (sym)))
|
||||
{
|
||||
r_extern = 0;
|
||||
r_index = N_ABS;
|
||||
}
|
||||
else if ((sym->flags & BSF_SECTION_SYM) == 0)
|
||||
{
|
||||
if (bfd_is_und_section (bfd_get_section (sym))
|
||||
if (bfd_is_und_section (bfd_asymbol_section (sym))
|
||||
/* Remember to check for weak symbols; they count as global. */
|
||||
|| (sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
|
||||
r_extern = 1;
|
||||
|
2
external/gpl3/binutils/dist/bfd/aout-ns32k.c
vendored
2
external/gpl3/binutils/dist/bfd/aout-ns32k.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for ns32k a.out-ish binaries.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Define a target vector and some small routines for a variant of a.out.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -180,7 +180,7 @@ MY (object_p) (bfd *abfd)
|
||||
#ifndef S_IXUSR
|
||||
#define S_IXUSR 0100 /* Execute by owner. */
|
||||
#endif
|
||||
if (stat(abfd->filename, &buf) == 0 && (buf.st_mode & S_IXUSR))
|
||||
if (stat (abfd->filename, &buf) == 0 && (buf.st_mode & S_IXUSR))
|
||||
abfd->flags |= EXEC_P;
|
||||
}
|
||||
#endif /* ENTRY_CAN_BE_ZERO */
|
||||
@ -502,6 +502,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
#ifndef MY_bfd_is_group_section
|
||||
#define MY_bfd_is_group_section bfd_generic_is_group_section
|
||||
#endif
|
||||
#ifndef MY_bfd_group_name
|
||||
#define MY_bfd_group_name bfd_generic_group_name
|
||||
#endif
|
||||
#ifndef MY_bfd_discard_group
|
||||
#define MY_bfd_discard_group bfd_generic_discard_group
|
||||
#endif
|
||||
|
103
external/gpl3/binutils/dist/bfd/aout-tic30.c
vendored
103
external/gpl3/binutils/dist/bfd/aout-tic30.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for TMS320C30 a.out binaries.
|
||||
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -710,53 +710,87 @@ static bfd_boolean
|
||||
MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
{
|
||||
struct internal_exec *execp = exec_hdr (abfd);
|
||||
asection *objsym_section;
|
||||
file_ptr pos;
|
||||
bfd_vma vma = 0;
|
||||
int pad;
|
||||
|
||||
/* Set the executable header size to 0, as we don't want one for an
|
||||
output. */
|
||||
output. FIXME: Really? tic30_aout_object_p doesn't accept such
|
||||
an executable! */
|
||||
adata (abfd).exec_bytes_size = 0;
|
||||
|
||||
pos = adata (abfd).exec_bytes_size;
|
||||
/* ??? Why are we looking at create_object_symbols_section? */
|
||||
objsym_section = info->create_object_symbols_section;
|
||||
if (objsym_section != NULL)
|
||||
vma = objsym_section->vma;
|
||||
|
||||
/* Text. */
|
||||
vma = info->create_object_symbols_section->vma;
|
||||
pos += vma;
|
||||
obj_textsec (abfd)->filepos = pos;
|
||||
obj_textsec (abfd)->vma = vma;
|
||||
obj_textsec (abfd)->user_set_vma = 1;
|
||||
pos += obj_textsec (abfd)->size;
|
||||
vma += obj_textsec (abfd)->size;
|
||||
if (obj_textsec (abfd) != NULL)
|
||||
{
|
||||
pos += vma;
|
||||
obj_textsec (abfd)->filepos = pos;
|
||||
obj_textsec (abfd)->vma = vma;
|
||||
obj_textsec (abfd)->user_set_vma = 1;
|
||||
execp->a_text = obj_textsec (abfd)->size;
|
||||
pos += obj_textsec (abfd)->size;
|
||||
vma += obj_textsec (abfd)->size;
|
||||
}
|
||||
|
||||
/* Data. */
|
||||
if (abfd->flags & D_PAGED)
|
||||
if (obj_datasec (abfd) != NULL)
|
||||
{
|
||||
if (info->create_object_symbols_section->next->vma > 0)
|
||||
obj_datasec (abfd)->vma = info->create_object_symbols_section->next->vma;
|
||||
if (abfd->flags & D_PAGED)
|
||||
{
|
||||
if (objsym_section != NULL
|
||||
&& objsym_section->next != NULL
|
||||
&& objsym_section->next->vma != 0)
|
||||
obj_datasec (abfd)->vma = objsym_section->next->vma;
|
||||
else
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
|
||||
}
|
||||
else
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
|
||||
|
||||
if (obj_datasec (abfd)->vma < vma)
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
|
||||
|
||||
pos += obj_datasec (abfd)->vma - vma;
|
||||
obj_datasec (abfd)->filepos = pos;
|
||||
obj_datasec (abfd)->user_set_vma = 1;
|
||||
|
||||
vma = obj_datasec (abfd)->vma;
|
||||
if (obj_textsec (abfd) != NULL)
|
||||
{
|
||||
execp->a_text = vma - obj_textsec (abfd)->vma;
|
||||
obj_textsec (abfd)->size = execp->a_text;
|
||||
}
|
||||
execp->a_data = obj_datasec (abfd)->size;
|
||||
vma += obj_datasec (abfd)->size;
|
||||
}
|
||||
else
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
|
||||
|
||||
if (obj_datasec (abfd)->vma < vma)
|
||||
obj_datasec (abfd)->vma = BFD_ALIGN (vma, 4);
|
||||
|
||||
obj_datasec (abfd)->user_set_vma = 1;
|
||||
vma = obj_datasec (abfd)->vma;
|
||||
obj_datasec (abfd)->filepos = vma + adata (abfd).exec_bytes_size;
|
||||
execp->a_text = vma - obj_textsec (abfd)->vma;
|
||||
obj_textsec (abfd)->size = execp->a_text;
|
||||
|
||||
/* Since BSS follows data immediately, see if it needs alignment. */
|
||||
vma += obj_datasec (abfd)->size;
|
||||
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
|
||||
obj_datasec (abfd)->size += pad;
|
||||
pos += obj_datasec (abfd)->size;
|
||||
execp->a_data = obj_datasec (abfd)->size;
|
||||
if (obj_bsssec (abfd) != NULL)
|
||||
{
|
||||
int pad;
|
||||
|
||||
/* BSS. */
|
||||
obj_bsssec (abfd)->vma = vma;
|
||||
obj_bsssec (abfd)->user_set_vma = 1;
|
||||
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
|
||||
if (obj_datasec (abfd) != NULL)
|
||||
{
|
||||
obj_datasec (abfd)->size += pad;
|
||||
execp->a_data += pad;
|
||||
}
|
||||
else if (obj_textsec (abfd) != NULL)
|
||||
{
|
||||
obj_textsec (abfd)->size += pad;
|
||||
execp->a_text += pad;
|
||||
}
|
||||
|
||||
/* BSS. */
|
||||
vma += pad;
|
||||
obj_bsssec (abfd)->vma = vma;
|
||||
obj_bsssec (abfd)->user_set_vma = 1;
|
||||
}
|
||||
|
||||
/* We are fully resized, so don't readjust in final_link. */
|
||||
adata (abfd).magic = z_magic;
|
||||
@ -957,6 +991,9 @@ tic30_aout_set_arch_mach (bfd *abfd,
|
||||
#ifndef MY_bfd_is_group_section
|
||||
#define MY_bfd_is_group_section bfd_generic_is_group_section
|
||||
#endif
|
||||
#ifndef MY_bfd_group_name
|
||||
#define MY_bfd_group_name bfd_generic_group_name
|
||||
#endif
|
||||
#ifndef MY_bfd_discard_group
|
||||
#define MY_bfd_discard_group bfd_generic_discard_group
|
||||
#endif
|
||||
|
2
external/gpl3/binutils/dist/bfd/aout32.c
vendored
2
external/gpl3/binutils/dist/bfd/aout32.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for 32-bit a.out files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
2
external/gpl3/binutils/dist/bfd/aout64.c
vendored
2
external/gpl3/binutils/dist/bfd/aout64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for 64-bit a.out files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
88
external/gpl3/binutils/dist/bfd/arc-got.h
vendored
88
external/gpl3/binutils/dist/bfd/arc-got.h
vendored
@ -1,5 +1,5 @@
|
||||
/* ARC-specific support for 32-bit ELF
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Contributed by Cupertino Miranda (cmiranda@synopsys.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -24,6 +24,9 @@
|
||||
|
||||
#define TCB_SIZE (8)
|
||||
|
||||
#define align_power(addr, align) \
|
||||
(((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
|
||||
|
||||
enum tls_type_e
|
||||
{
|
||||
GOT_UNKNOWN = 0,
|
||||
@ -51,27 +54,26 @@ struct got_entry
|
||||
enum tls_got_entries existing_entries;
|
||||
};
|
||||
|
||||
/* Return the local got list, if not defined, create an empty one. */
|
||||
|
||||
static struct got_entry **
|
||||
arc_get_local_got_ents (bfd * abfd)
|
||||
{
|
||||
static struct got_entry **local_got_ents = NULL;
|
||||
|
||||
if (local_got_ents == NULL)
|
||||
if (elf_local_got_ents (abfd) == NULL)
|
||||
{
|
||||
size_t size;
|
||||
Elf_Internal_Shdr *symtab_hdr = &((elf_tdata (abfd))->symtab_hdr);
|
||||
|
||||
size = symtab_hdr->sh_info * sizeof (bfd_vma);
|
||||
local_got_ents = (struct got_entry **)
|
||||
bfd_alloc (abfd, sizeof (struct got_entry *) * size);
|
||||
if (local_got_ents == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset (local_got_ents, 0, sizeof (struct got_entry *) * size);
|
||||
elf_local_got_ents (abfd) = local_got_ents;
|
||||
bfd_size_type amt = (elf_tdata (abfd)->symtab_hdr.sh_info
|
||||
* sizeof (*elf_local_got_ents (abfd)));
|
||||
elf_local_got_ents (abfd) = bfd_zmalloc (amt);
|
||||
if (elf_local_got_ents (abfd) == NULL)
|
||||
{
|
||||
_bfd_error_handler (_("%pB: cannot allocate memory for local "
|
||||
"GOT entries"), abfd);
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return local_got_ents;
|
||||
return elf_local_got_ents (abfd);
|
||||
}
|
||||
|
||||
static struct got_entry *
|
||||
@ -156,15 +158,15 @@ get_got_entry_list_for_symbol (bfd *abfd,
|
||||
unsigned long r_symndx,
|
||||
struct elf_link_hash_entry *h)
|
||||
{
|
||||
if (h != NULL)
|
||||
struct elf_arc_link_hash_entry *h1 =
|
||||
((struct elf_arc_link_hash_entry *) h);
|
||||
if (h1 != NULL)
|
||||
{
|
||||
return &h->got.glist;
|
||||
return &h1->got_ents;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct got_entry **local_got_ents
|
||||
= arc_get_local_got_ents (abfd);
|
||||
return &local_got_ents[r_symndx];
|
||||
return arc_get_local_got_ents (abfd) + r_symndx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,7 +208,7 @@ arc_got_entry_type_for_reloc (reloc_howto_type *howto)
|
||||
__LINE__, name_for_global_symbol (H)); \
|
||||
} \
|
||||
if (H) \
|
||||
if (h->dynindx == -1 && !h->forced_local) \
|
||||
if (H->dynindx == -1 && !H->forced_local) \
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, H)) \
|
||||
return FALSE; \
|
||||
htab->s##SECNAME->size += 4; \
|
||||
@ -282,6 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
||||
BFD_ASSERT (entry);
|
||||
|
||||
if (h == NULL
|
||||
|| h->forced_local == TRUE
|
||||
|| (! elf_hash_table (info)->dynamic_sections_created
|
||||
|| (bfd_link_pic (info)
|
||||
&& SYMBOL_REFERENCES_LOCAL (info, h))))
|
||||
@ -329,23 +332,31 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
||||
BFD_ASSERT (tls_sec && tls_sec->output_section);
|
||||
bfd_vma sec_vma = tls_sec->output_section->vma;
|
||||
|
||||
bfd_put_32 (output_bfd,
|
||||
sym_value - sec_vma,
|
||||
if (h == NULL || h->forced_local
|
||||
|| !elf_hash_table (info)->dynamic_sections_created)
|
||||
{
|
||||
bfd_put_32 (output_bfd,
|
||||
sym_value - sec_vma
|
||||
+ (elf_hash_table (info)->dynamic_sections_created
|
||||
? 0
|
||||
: (align_power (0,
|
||||
tls_sec->alignment_power))),
|
||||
htab->sgot->contents + entry->offset
|
||||
+ (entry->existing_entries == TLS_GOT_MOD_AND_OFF
|
||||
? 4 : 0));
|
||||
|
||||
ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
|
||||
"@ %lx, for symbol %s\n",
|
||||
(entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
|
||||
"GOT_TLS_IE"),
|
||||
(long) (sym_value - sec_vma),
|
||||
(long) (htab->sgot->output_section->vma
|
||||
+ htab->sgot->output_offset->vma
|
||||
+ entry->offset
|
||||
+ (entry->existing_entries == TLS_GOT_MOD_AND_OFF
|
||||
? 4 : 0)),
|
||||
symbol_name);
|
||||
ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
|
||||
"@ %lx, for symbol %s\n",
|
||||
(entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
|
||||
"GOT_TLS_IE"),
|
||||
(long) (sym_value - sec_vma),
|
||||
(long) (htab->sgot->output_section->vma
|
||||
+ htab->sgot->output_offset
|
||||
+ entry->offset
|
||||
+ (entry->existing_entries == TLS_GOT_MOD_AND_OFF
|
||||
? 4 : 0)),
|
||||
symbol_name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -357,7 +368,10 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
||||
|
||||
bfd_put_32 (output_bfd,
|
||||
sym_value - sec_vma
|
||||
+ (elf_hash_table (info)->dynamic_sections_created ? 0 : TCB_SIZE),
|
||||
+ (elf_hash_table (info)->dynamic_sections_created
|
||||
? 0
|
||||
: (align_power (TCB_SIZE,
|
||||
tls_sec->alignment_power))),
|
||||
htab->sgot->contents + entry->offset
|
||||
+ (entry->existing_entries == TLS_GOT_MOD_AND_OFF
|
||||
? 4 : 0));
|
||||
@ -368,7 +382,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
||||
"GOT_TLS_IE"),
|
||||
(long) (sym_value - sec_vma),
|
||||
(long) (htab->sgot->output_section->vma
|
||||
+ htab->sgot->output_offset->vma
|
||||
+ htab->sgot->output_offset
|
||||
+ entry->offset
|
||||
+ (entry->existing_entries == TLS_GOT_MOD_AND_OFF
|
||||
? 4 : 0)),
|
||||
|
2
external/gpl3/binutils/dist/bfd/arc-plt.def
vendored
2
external/gpl3/binutils/dist/bfd/arc-plt.def
vendored
@ -1,5 +1,5 @@
|
||||
/* Arc V2 Related PLT entries.
|
||||
Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
Contributed by Cupertino Miranda (cmiranda@synopsys.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
4
external/gpl3/binutils/dist/bfd/arc-plt.h
vendored
4
external/gpl3/binutils/dist/bfd/arc-plt.h
vendored
@ -1,5 +1,5 @@
|
||||
/* ARC-specific header file for PLT support.
|
||||
Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
Contributed by Cupertino Miranda (cmiranda@synopsys.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -22,8 +22,6 @@
|
||||
#ifndef ARC_PLT_H
|
||||
#define ARC_PLT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Instructions appear in memory as a sequence of half-words (16 bit);
|
||||
individual half-words are represented on the target in target byte order.
|
||||
We use 'unsigned short' on the host to represent the PLT templates,
|
||||
|
25
external/gpl3/binutils/dist/bfd/archive64.c
vendored
25
external/gpl3/binutils/dist/bfd/archive64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* Support for 64-bit archives.
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
Ian Lance Taylor, Cygnus Support
|
||||
Linker support added by Mark Mitchell, CodeSourcery, LLC.
|
||||
<mark@codesourcery.com>
|
||||
@ -66,7 +66,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
||||
|
||||
if (! CONST_STRNEQ (nextname, "/SYM64/ "))
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -90,7 +90,14 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
||||
ptrsize = 8 * nsymz;
|
||||
|
||||
amt = carsym_size + stringsize + 1;
|
||||
if (carsym_size < nsymz || ptrsize < nsymz || amt < nsymz)
|
||||
if (/* Catch overflow in stringsize (and ptrsize) expression. */
|
||||
nsymz >= (bfd_size_type) -1 / 8
|
||||
|| stringsize > parsed_size
|
||||
/* Catch overflow in carsym_size expression. */
|
||||
|| nsymz > (bfd_size_type) -1 / sizeof (carsym)
|
||||
/* Catch overflow in amt expression. */
|
||||
|| amt <= carsym_size
|
||||
|| amt <= stringsize)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
@ -100,8 +107,6 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
||||
return FALSE;
|
||||
carsyms = ardata->symdefs;
|
||||
stringbase = ((char *) ardata->symdefs) + carsym_size;
|
||||
stringbase[stringsize] = 0;
|
||||
stringend = stringbase + stringsize;
|
||||
|
||||
raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
|
||||
if (raw_armap == NULL)
|
||||
@ -115,22 +120,24 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
||||
goto release_raw_armap;
|
||||
}
|
||||
|
||||
stringend = stringbase + stringsize;
|
||||
*stringend = 0;
|
||||
for (i = 0; i < nsymz; i++)
|
||||
{
|
||||
carsyms->file_offset = bfd_getb64 (raw_armap + i * 8);
|
||||
carsyms->name = stringbase;
|
||||
if (stringbase < stringend)
|
||||
stringbase += strlen (stringbase) + 1;
|
||||
stringbase += strlen (stringbase);
|
||||
if (stringbase != stringend)
|
||||
++stringbase;
|
||||
++carsyms;
|
||||
}
|
||||
*stringbase = '\0';
|
||||
|
||||
ardata->symdef_count = nsymz;
|
||||
ardata->first_file_filepos = bfd_tell (abfd);
|
||||
/* Pad to an even boundary if you have to. */
|
||||
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
|
||||
|
||||
bfd_has_map (abfd) = TRUE;
|
||||
abfd->has_armap = TRUE;
|
||||
bfd_release (abfd, raw_armap);
|
||||
|
||||
return TRUE;
|
||||
|
555
external/gpl3/binutils/dist/bfd/bfd-in.h
vendored
555
external/gpl3/binutils/dist/bfd/bfd-in.h
vendored
@ -1,6 +1,6 @@
|
||||
/* Main header file for the bfd library -- portable access to object files.
|
||||
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
@ -34,6 +34,7 @@ extern "C" {
|
||||
|
||||
#include "ansidecl.h"
|
||||
#include "symcat.h"
|
||||
#include "bfd_stdint.h"
|
||||
#include "diagnostics.h"
|
||||
#include <stdarg.h>
|
||||
#include <sys/stat.h>
|
||||
@ -234,32 +235,13 @@ bfd_format;
|
||||
/* A count of carsyms (canonical archive symbols). */
|
||||
typedef unsigned long symindex;
|
||||
|
||||
/* How to perform a relocation. */
|
||||
typedef const struct reloc_howto_struct reloc_howto_type;
|
||||
|
||||
#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
|
||||
|
||||
/* General purpose part of a symbol X;
|
||||
target specific parts are in libcoff.h, libaout.h, etc. */
|
||||
|
||||
#define bfd_get_section(x) ((x)->section)
|
||||
#define bfd_get_output_section(x) ((x)->section->output_section)
|
||||
#define bfd_set_section(x,y) ((x)->section) = (y)
|
||||
#define bfd_asymbol_base(x) ((x)->section->vma)
|
||||
#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
|
||||
#define bfd_asymbol_name(x) ((x)->name)
|
||||
/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
|
||||
#define bfd_asymbol_bfd(x) ((x)->the_bfd)
|
||||
#define bfd_asymbol_flavour(x) \
|
||||
(((x)->flags & BSF_SYNTHETIC) != 0 \
|
||||
? bfd_target_unknown_flavour \
|
||||
: bfd_asymbol_bfd (x)->xvec->flavour)
|
||||
|
||||
/* A canonical archive symbol. */
|
||||
/* This is a type pun with struct ranlib on purpose! */
|
||||
typedef struct carsym
|
||||
{
|
||||
char *name;
|
||||
const char *name;
|
||||
file_ptr file_offset; /* Look here to find the file. */
|
||||
}
|
||||
carsym; /* To make these you call a carsymogen. */
|
||||
@ -303,37 +285,6 @@ typedef struct bfd_section *sec_ptr;
|
||||
((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
|
||||
? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
|
||||
: ~ (bfd_vma) 0)
|
||||
|
||||
#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
|
||||
#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
|
||||
#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
|
||||
#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
|
||||
(ptr)->alignment_power)
|
||||
#define bfd_section_name(bfd, ptr) ((ptr)->name)
|
||||
#define bfd_section_size(bfd, ptr) ((ptr)->size)
|
||||
#define bfd_get_section_size(ptr) ((ptr)->size)
|
||||
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
|
||||
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
|
||||
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
|
||||
#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
|
||||
#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
|
||||
|
||||
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
|
||||
|
||||
#define bfd_get_section_limit_octets(bfd, sec) \
|
||||
((bfd)->direction != write_direction && (sec)->rawsize != 0 \
|
||||
? (sec)->rawsize : (sec)->size)
|
||||
|
||||
/* Find the address one past the end of SEC. */
|
||||
#define bfd_get_section_limit(bfd, sec) \
|
||||
(bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
|
||||
|
||||
/* Return TRUE if input section SEC has been discarded. */
|
||||
#define discarded_section(sec) \
|
||||
(!bfd_is_abs_section (sec) \
|
||||
&& bfd_is_abs_section ((sec)->output_section) \
|
||||
&& (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
|
||||
&& (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
|
||||
|
||||
typedef enum bfd_print_symbol
|
||||
{
|
||||
@ -520,40 +471,6 @@ extern int bfd_stat (bfd *, struct stat *);
|
||||
#endif
|
||||
extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
|
||||
|
||||
/* Cast from const char * to char * so that caller can assign to
|
||||
a char * without a warning. */
|
||||
#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
|
||||
#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
|
||||
#define bfd_get_format(abfd) ((abfd)->format)
|
||||
#define bfd_get_target(abfd) ((abfd)->xvec->name)
|
||||
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
|
||||
#define bfd_family_coff(abfd) \
|
||||
(bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
|
||||
bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
|
||||
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
|
||||
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
|
||||
#define bfd_header_big_endian(abfd) \
|
||||
((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
|
||||
#define bfd_header_little_endian(abfd) \
|
||||
((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
|
||||
#define bfd_get_file_flags(abfd) ((abfd)->flags)
|
||||
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
|
||||
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
|
||||
#define bfd_has_map(abfd) ((abfd)->has_armap)
|
||||
#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
|
||||
|
||||
#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
|
||||
#define bfd_usrdata(abfd) ((abfd)->usrdata)
|
||||
|
||||
#define bfd_get_start_address(abfd) ((abfd)->start_address)
|
||||
#define bfd_get_symcount(abfd) ((abfd)->symcount)
|
||||
#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
|
||||
#define bfd_count_sections(abfd) ((abfd)->section_count)
|
||||
|
||||
#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
|
||||
|
||||
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
|
||||
|
||||
extern bfd_boolean bfd_cache_close
|
||||
(bfd *abfd);
|
||||
/* NB: This declaration should match the autogenerated one in libbfd.h. */
|
||||
@ -592,195 +509,6 @@ void bfd_putl16 (bfd_vma, void *);
|
||||
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
|
||||
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
|
||||
|
||||
#if defined(__STDC__) || defined(ALMOST_STDC)
|
||||
struct ecoff_debug_info;
|
||||
struct ecoff_debug_swap;
|
||||
struct ecoff_extr;
|
||||
struct bfd_symbol;
|
||||
struct bfd_link_info;
|
||||
struct bfd_link_hash_entry;
|
||||
struct bfd_section_already_linked;
|
||||
struct bfd_elf_version_tree;
|
||||
#endif
|
||||
|
||||
extern bfd_boolean bfd_section_already_linked_table_init (void);
|
||||
extern void bfd_section_already_linked_table_free (void);
|
||||
extern bfd_boolean _bfd_handle_already_linked
|
||||
(struct bfd_section *, struct bfd_section_already_linked *,
|
||||
struct bfd_link_info *);
|
||||
|
||||
/* Externally visible ECOFF routines. */
|
||||
|
||||
extern bfd_boolean bfd_ecoff_set_gp_value
|
||||
(bfd *abfd, bfd_vma gp_value);
|
||||
extern bfd_boolean bfd_ecoff_set_regmasks
|
||||
(bfd *abfd, unsigned long gprmask, unsigned long fprmask,
|
||||
unsigned long *cprmask);
|
||||
extern void *bfd_ecoff_debug_init
|
||||
(bfd *output_bfd, struct ecoff_debug_info *output_debug,
|
||||
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
|
||||
extern void bfd_ecoff_debug_free
|
||||
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
|
||||
const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_ecoff_debug_accumulate
|
||||
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
|
||||
const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
|
||||
struct ecoff_debug_info *input_debug,
|
||||
const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_ecoff_debug_accumulate_other
|
||||
(void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
|
||||
const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
|
||||
struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_ecoff_debug_externals
|
||||
(bfd *abfd, struct ecoff_debug_info *debug,
|
||||
const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
|
||||
bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
|
||||
void (*set_index) (struct bfd_symbol *, bfd_size_type));
|
||||
extern bfd_boolean bfd_ecoff_debug_one_external
|
||||
(bfd *abfd, struct ecoff_debug_info *debug,
|
||||
const struct ecoff_debug_swap *swap, const char *name,
|
||||
struct ecoff_extr *esym);
|
||||
extern bfd_size_type bfd_ecoff_debug_size
|
||||
(bfd *abfd, struct ecoff_debug_info *debug,
|
||||
const struct ecoff_debug_swap *swap);
|
||||
extern bfd_boolean bfd_ecoff_write_debug
|
||||
(bfd *abfd, struct ecoff_debug_info *debug,
|
||||
const struct ecoff_debug_swap *swap, file_ptr where);
|
||||
extern bfd_boolean bfd_ecoff_write_accumulated_debug
|
||||
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
|
||||
const struct ecoff_debug_swap *swap,
|
||||
struct bfd_link_info *info, file_ptr where);
|
||||
|
||||
/* Externally visible ELF routines. */
|
||||
|
||||
struct bfd_link_needed_list
|
||||
{
|
||||
struct bfd_link_needed_list *next;
|
||||
bfd *by;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
enum dynamic_lib_link_class {
|
||||
DYN_NORMAL = 0,
|
||||
DYN_AS_NEEDED = 1,
|
||||
DYN_DT_NEEDED = 2,
|
||||
DYN_NO_ADD_NEEDED = 4,
|
||||
DYN_NO_NEEDED = 8
|
||||
};
|
||||
|
||||
enum notice_asneeded_action {
|
||||
notice_as_needed,
|
||||
notice_not_needed,
|
||||
notice_needed
|
||||
};
|
||||
|
||||
extern bfd_boolean bfd_elf_record_link_assignment
|
||||
(bfd *, struct bfd_link_info *, const char *, bfd_boolean,
|
||||
bfd_boolean);
|
||||
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_elf_get_bfd_needed_list
|
||||
(bfd *, struct bfd_link_needed_list **);
|
||||
extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
|
||||
const char *, bfd_vma);
|
||||
extern bfd_boolean bfd_elf_size_dynamic_sections
|
||||
(bfd *, const char *, const char *, const char *, const char *, const char *,
|
||||
const char * const *, struct bfd_link_info *, struct bfd_section **);
|
||||
extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern void bfd_elf_set_dt_needed_name
|
||||
(bfd *, const char *);
|
||||
extern const char *bfd_elf_get_dt_soname
|
||||
(bfd *);
|
||||
extern void bfd_elf_set_dyn_lib_class
|
||||
(bfd *, enum dynamic_lib_link_class);
|
||||
extern int bfd_elf_get_dyn_lib_class
|
||||
(bfd *);
|
||||
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int bfd_elf_discard_info
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern unsigned int _bfd_elf_default_action_discarded
|
||||
(struct bfd_section *);
|
||||
|
||||
/* Return an upper bound on the number of bytes required to store a
|
||||
copy of ABFD's program header table entries. Return -1 if an error
|
||||
occurs; bfd_get_error will return an appropriate code. */
|
||||
extern long bfd_get_elf_phdr_upper_bound
|
||||
(bfd *abfd);
|
||||
|
||||
/* Copy ABFD's program header table entries to *PHDRS. The entries
|
||||
will be stored as an array of Elf_Internal_Phdr structures, as
|
||||
defined in include/elf/internal.h. To find out how large the
|
||||
buffer needs to be, call bfd_get_elf_phdr_upper_bound.
|
||||
|
||||
Return the number of program header table entries read, or -1 if an
|
||||
error occurs; bfd_get_error will return an appropriate code. */
|
||||
extern int bfd_get_elf_phdrs
|
||||
(bfd *abfd, void *phdrs);
|
||||
|
||||
/* Create a new BFD as if by bfd_openr. Rather than opening a file,
|
||||
reconstruct an ELF file by reading the segments out of remote
|
||||
memory based on the ELF file header at EHDR_VMA and the ELF program
|
||||
headers it points to. If non-zero, SIZE is the known extent of the
|
||||
object. If not null, *LOADBASEP is filled in with the difference
|
||||
between the VMAs from which the segments were read, and the VMAs
|
||||
the file headers (and hence BFD's idea of each section's VMA) put
|
||||
them at.
|
||||
|
||||
The function TARGET_READ_MEMORY is called to copy LEN bytes from
|
||||
the remote memory at target address VMA into the local buffer at
|
||||
MYADDR; it should return zero on success or an `errno' code on
|
||||
failure. TEMPL must be a BFD for a target with the word size and
|
||||
byte order found in the remote memory. */
|
||||
extern bfd *bfd_elf_bfd_from_remote_memory
|
||||
(bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
|
||||
int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
|
||||
bfd_size_type len));
|
||||
|
||||
extern struct bfd_section *_bfd_elf_tls_setup
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern struct bfd_section *
|
||||
_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
|
||||
|
||||
extern void _bfd_fix_excluded_sec_syms
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern unsigned bfd_m68k_mach_to_features (int);
|
||||
|
||||
extern int bfd_m68k_features_to_mach (unsigned);
|
||||
|
||||
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
|
||||
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
||||
char **);
|
||||
|
||||
extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
|
||||
|
||||
extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
|
||||
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
||||
char **);
|
||||
|
||||
extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
|
||||
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
|
||||
char **);
|
||||
|
||||
/* SunOS shared library support routines for the linker. */
|
||||
|
||||
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_sunos_record_link_assignment
|
||||
(bfd *, struct bfd_link_info *, const char *);
|
||||
extern bfd_boolean bfd_sunos_size_dynamic_sections
|
||||
(bfd *, struct bfd_link_info *, struct bfd_section **,
|
||||
struct bfd_section **, struct bfd_section **);
|
||||
|
||||
/* Linux shared library support routines for the linker. */
|
||||
|
||||
extern bfd_boolean bfd_i386linux_size_dynamic_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern bfd_boolean bfd_sparclinux_size_dynamic_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
/* mmap hacks */
|
||||
|
||||
@ -808,258 +536,31 @@ extern void bfd_free_window
|
||||
(bfd_window *);
|
||||
extern bfd_boolean bfd_get_file_window
|
||||
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
|
||||
|
||||
/* Externally visible ELF routines. */
|
||||
|
||||
/* XCOFF support routines for the linker. */
|
||||
/* Create a new BFD as if by bfd_openr. Rather than opening a file,
|
||||
reconstruct an ELF file by reading the segments out of remote
|
||||
memory based on the ELF file header at EHDR_VMA and the ELF program
|
||||
headers it points to. If non-zero, SIZE is the known extent of the
|
||||
object. If not null, *LOADBASEP is filled in with the difference
|
||||
between the VMAs from which the segments were read, and the VMAs
|
||||
the file headers (and hence BFD's idea of each section's VMA) put
|
||||
them at.
|
||||
|
||||
extern bfd_boolean bfd_xcoff_split_import_path
|
||||
(bfd *, const char *, const char **, const char **);
|
||||
extern bfd_boolean bfd_xcoff_set_archive_import_path
|
||||
(struct bfd_link_info *, bfd *, const char *);
|
||||
extern bfd_boolean bfd_xcoff_link_record_set
|
||||
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
|
||||
extern bfd_boolean bfd_xcoff_import_symbol
|
||||
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
|
||||
const char *, const char *, const char *, unsigned int);
|
||||
extern bfd_boolean bfd_xcoff_export_symbol
|
||||
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
|
||||
extern bfd_boolean bfd_xcoff_link_count_reloc
|
||||
(bfd *, struct bfd_link_info *, const char *);
|
||||
extern bfd_boolean bfd_xcoff_record_link_assignment
|
||||
(bfd *, struct bfd_link_info *, const char *);
|
||||
extern bfd_boolean bfd_xcoff_size_dynamic_sections
|
||||
(bfd *, struct bfd_link_info *, const char *, const char *,
|
||||
unsigned long, unsigned long, unsigned long, bfd_boolean,
|
||||
int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
|
||||
extern bfd_boolean bfd_xcoff_link_generate_rtinit
|
||||
(bfd *, const char *, const char *, bfd_boolean);
|
||||
The function TARGET_READ_MEMORY is called to copy LEN bytes from
|
||||
the remote memory at target address VMA into the local buffer at
|
||||
MYADDR; it should return zero on success or an `errno' code on
|
||||
failure. TEMPL must be a BFD for a target with the word size and
|
||||
byte order found in the remote memory. */
|
||||
extern bfd *bfd_elf_bfd_from_remote_memory
|
||||
(bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
|
||||
int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
|
||||
bfd_size_type len));
|
||||
|
||||
/* XCOFF support routines for ar. */
|
||||
extern bfd_boolean bfd_xcoff_ar_archive_set_magic
|
||||
(bfd *, char *);
|
||||
|
||||
/* Externally visible COFF routines. */
|
||||
|
||||
#if defined(__STDC__) || defined(ALMOST_STDC)
|
||||
struct internal_syment;
|
||||
union internal_auxent;
|
||||
#endif
|
||||
|
||||
extern bfd_boolean bfd_coff_set_symbol_class
|
||||
(bfd *, struct bfd_symbol *, unsigned int);
|
||||
|
||||
/* ARM VFP11 erratum workaround support. */
|
||||
typedef enum
|
||||
{
|
||||
BFD_ARM_VFP11_FIX_DEFAULT,
|
||||
BFD_ARM_VFP11_FIX_NONE,
|
||||
BFD_ARM_VFP11_FIX_SCALAR,
|
||||
BFD_ARM_VFP11_FIX_VECTOR
|
||||
} bfd_arm_vfp11_fix;
|
||||
|
||||
extern void bfd_elf32_arm_init_maps
|
||||
(bfd *);
|
||||
|
||||
extern void bfd_elf32_arm_set_vfp11_fix
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern void bfd_elf32_arm_set_cortex_a8_fix
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern void bfd_elf32_arm_vfp11_fix_veneer_locations
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
/* ARM STM STM32L4XX erratum workaround support. */
|
||||
typedef enum
|
||||
{
|
||||
BFD_ARM_STM32L4XX_FIX_NONE,
|
||||
BFD_ARM_STM32L4XX_FIX_DEFAULT,
|
||||
BFD_ARM_STM32L4XX_FIX_ALL
|
||||
} bfd_arm_stm32l4xx_fix;
|
||||
|
||||
extern void bfd_elf32_arm_set_stm32l4xx_fix
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
/* ARM Interworking support. Called from linker. */
|
||||
extern bfd_boolean bfd_arm_allocate_interworking_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_arm_process_before_allocation
|
||||
(bfd *, struct bfd_link_info *, int);
|
||||
|
||||
extern bfd_boolean bfd_arm_get_bfd_for_interworking
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
/* PE ARM Interworking support. Called from linker. */
|
||||
extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_arm_pe_process_before_allocation
|
||||
(bfd *, struct bfd_link_info *, int);
|
||||
|
||||
extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
/* ELF ARM Interworking support. Called from linker. */
|
||||
extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_elf32_arm_process_before_allocation
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
struct elf32_arm_params {
|
||||
char *thumb_entry_symbol;
|
||||
int byteswap_code;
|
||||
int target1_is_rel;
|
||||
char * target2_type;
|
||||
int fix_v4bx;
|
||||
int use_blx;
|
||||
bfd_arm_vfp11_fix vfp11_denorm_fix;
|
||||
bfd_arm_stm32l4xx_fix stm32l4xx_fix;
|
||||
int no_enum_size_warning;
|
||||
int no_wchar_size_warning;
|
||||
int pic_veneer;
|
||||
int fix_cortex_a8;
|
||||
int fix_arm1176;
|
||||
int merge_exidx_entries;
|
||||
int cmse_implib;
|
||||
bfd *in_implib_bfd;
|
||||
};
|
||||
|
||||
void bfd_elf32_arm_set_target_params
|
||||
(bfd *, struct bfd_link_info *, struct elf32_arm_params *);
|
||||
|
||||
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
extern void bfd_elf32_arm_keep_private_stub_output_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
/* ELF ARM mapping symbol support. */
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
|
||||
|
||||
extern bfd_boolean bfd_is_arm_special_symbol_name
|
||||
(const char *, int);
|
||||
|
||||
extern void bfd_elf32_arm_set_byteswap_code
|
||||
(struct bfd_link_info *, int);
|
||||
|
||||
extern void bfd_elf32_arm_use_long_plt (void);
|
||||
|
||||
/* ARM Note section processing. */
|
||||
extern bfd_boolean bfd_arm_merge_machines
|
||||
(bfd *, bfd *);
|
||||
|
||||
extern bfd_boolean bfd_arm_update_notes
|
||||
(bfd *, const char *);
|
||||
|
||||
extern unsigned int bfd_arm_get_mach_from_notes
|
||||
(bfd *, const char *);
|
||||
|
||||
/* ARM stub generation support. Called from the linker. */
|
||||
extern int elf32_arm_setup_section_lists
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern void elf32_arm_next_input_section
|
||||
(struct bfd_link_info *, struct bfd_section *);
|
||||
extern bfd_boolean elf32_arm_size_stubs
|
||||
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
|
||||
struct bfd_section * (*) (const char *, struct bfd_section *,
|
||||
struct bfd_section *, unsigned int),
|
||||
void (*) (void));
|
||||
extern bfd_boolean elf32_arm_build_stubs
|
||||
(struct bfd_link_info *);
|
||||
|
||||
/* ARM unwind section editing support. */
|
||||
extern bfd_boolean elf32_arm_fix_exidx_coverage
|
||||
(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
|
||||
|
||||
/* C6x unwind section editing support. */
|
||||
extern bfd_boolean elf32_tic6x_fix_exidx_coverage
|
||||
(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
|
||||
|
||||
extern void bfd_elf64_aarch64_init_maps
|
||||
(bfd *);
|
||||
|
||||
extern void bfd_elf32_aarch64_init_maps
|
||||
(bfd *);
|
||||
|
||||
extern void bfd_elf64_aarch64_set_options
|
||||
(bfd *, struct bfd_link_info *, int, int, int, int, int, int);
|
||||
|
||||
extern void bfd_elf32_aarch64_set_options
|
||||
(bfd *, struct bfd_link_info *, int, int, int, int, int, int);
|
||||
|
||||
/* ELF AArch64 mapping symbol support. */
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
|
||||
extern bfd_boolean bfd_is_aarch64_special_symbol_name
|
||||
(const char * name, int type);
|
||||
|
||||
/* AArch64 stub generation support for ELF64. Called from the linker. */
|
||||
extern int elf64_aarch64_setup_section_lists
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern void elf64_aarch64_next_input_section
|
||||
(struct bfd_link_info *, struct bfd_section *);
|
||||
extern bfd_boolean elf64_aarch64_size_stubs
|
||||
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
|
||||
struct bfd_section * (*) (const char *, struct bfd_section *),
|
||||
void (*) (void));
|
||||
extern bfd_boolean elf64_aarch64_build_stubs
|
||||
(struct bfd_link_info *);
|
||||
/* AArch64 stub generation support for ELF32. Called from the linker. */
|
||||
extern int elf32_aarch64_setup_section_lists
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern void elf32_aarch64_next_input_section
|
||||
(struct bfd_link_info *, struct bfd_section *);
|
||||
extern bfd_boolean elf32_aarch64_size_stubs
|
||||
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
|
||||
struct bfd_section * (*) (const char *, struct bfd_section *),
|
||||
void (*) (void));
|
||||
extern bfd_boolean elf32_aarch64_build_stubs
|
||||
(struct bfd_link_info *);
|
||||
|
||||
|
||||
/* TI COFF load page support. */
|
||||
extern void bfd_ticoff_set_section_load_page
|
||||
(struct bfd_section *, int);
|
||||
|
||||
extern int bfd_ticoff_get_section_load_page
|
||||
(struct bfd_section *);
|
||||
|
||||
/* H8/300 functions. */
|
||||
extern bfd_vma bfd_h8300_pad_address
|
||||
(bfd *, bfd_vma);
|
||||
|
||||
/* IA64 Itanium code generation. Called from linker. */
|
||||
extern void bfd_elf32_ia64_after_parse
|
||||
(int);
|
||||
|
||||
extern void bfd_elf64_ia64_after_parse
|
||||
(int);
|
||||
|
||||
/* V850 Note manipulation routines. */
|
||||
extern bfd_boolean v850_elf_create_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean v850_elf_set_note
|
||||
(bfd *, unsigned int, unsigned int);
|
||||
|
||||
/* MIPS ABI flags data access. For the disassembler. */
|
||||
struct elf_internal_abiflags_v0;
|
||||
extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
|
||||
/* Forward declarations. */
|
||||
struct ecoff_debug_info;
|
||||
struct ecoff_debug_swap;
|
||||
struct ecoff_extr;
|
||||
struct bfd_link_info;
|
||||
struct bfd_link_hash_entry;
|
||||
|
2
external/gpl3/binutils/dist/bfd/bfd.m4
vendored
2
external/gpl3/binutils/dist/bfd/bfd.m4
vendored
@ -1,6 +1,6 @@
|
||||
dnl This file was derived from acinclude.m4.
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This file is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
|
2
external/gpl3/binutils/dist/bfd/bfdio.c
vendored
2
external/gpl3/binutils/dist/bfd/bfdio.c
vendored
@ -1,6 +1,6 @@
|
||||
/* Low-level I/O routines for BFDs.
|
||||
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
2
external/gpl3/binutils/dist/bfd/bfdwin.c
vendored
2
external/gpl3/binutils/dist/bfd/bfdwin.c
vendored
@ -1,5 +1,5 @@
|
||||
/* Support for memory-mapped windows into a BFD.
|
||||
Copyright (C) 1995-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
7
external/gpl3/binutils/dist/bfd/binary.c
vendored
7
external/gpl3/binutils/dist/bfd/binary.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for binary objects.
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -230,7 +230,6 @@ binary_set_section_contents (bfd *abfd,
|
||||
|
||||
if (! abfd->output_has_begun)
|
||||
{
|
||||
unsigned int opb;
|
||||
bfd_boolean found_low;
|
||||
bfd_vma low;
|
||||
asection *s;
|
||||
@ -251,9 +250,10 @@ binary_set_section_contents (bfd *abfd,
|
||||
found_low = TRUE;
|
||||
}
|
||||
|
||||
opb = bfd_octets_per_byte (abfd);
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
{
|
||||
unsigned int opb = bfd_octets_per_byte (abfd, s);
|
||||
|
||||
s->filepos = (s->lma - low) * opb;
|
||||
|
||||
/* Skip following warning check for sections that will not
|
||||
@ -307,6 +307,7 @@ binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
#define binary_bfd_lookup_section_flags bfd_generic_lookup_section_flags
|
||||
#define binary_bfd_merge_sections bfd_generic_merge_sections
|
||||
#define binary_bfd_is_group_section bfd_generic_is_group_section
|
||||
#define binary_bfd_group_name bfd_generic_group_name
|
||||
#define binary_bfd_discard_group bfd_generic_discard_group
|
||||
#define binary_section_already_linked _bfd_generic_section_already_linked
|
||||
#define binary_bfd_define_common_symbol bfd_generic_define_common_symbol
|
||||
|
3
external/gpl3/binutils/dist/bfd/cache.c
vendored
3
external/gpl3/binutils/dist/bfd/cache.c
vendored
@ -1,6 +1,6 @@
|
||||
/* BFD library -- caching of file descriptors.
|
||||
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
|
||||
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
|
||||
|
||||
@ -44,7 +44,6 @@ SUBSECTION
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "bfd_stdint.h"
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Intel 386 COFF LynxOS files.
|
||||
Copyright (C) 1993-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
2
external/gpl3/binutils/dist/bfd/cisco-core.c
vendored
2
external/gpl3/binutils/dist/bfd/cisco-core.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for CISCO crash dumps.
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
25
external/gpl3/binutils/dist/bfd/coff-arm.c
vendored
25
external/gpl3/binutils/dist/bfd/coff-arm.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for ARM COFF files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -24,6 +24,8 @@
|
||||
#include "libbfd.h"
|
||||
#include "coff/arm.h"
|
||||
#include "coff/internal.h"
|
||||
#include "cpu-arm.h"
|
||||
#include "coff-arm.h"
|
||||
|
||||
#ifdef COFF_WITH_PE
|
||||
#include "coff/pe.h"
|
||||
@ -31,6 +33,9 @@
|
||||
|
||||
#include "libcoff.h"
|
||||
|
||||
/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */
|
||||
#define OCTETS_PER_BYTE(ABFD, SEC) 1
|
||||
|
||||
/* Macros for manipulation the bits in the flags field of the coff data
|
||||
structure. */
|
||||
#define APCS_26_FLAG(abfd) \
|
||||
@ -94,7 +99,7 @@ coff_arm_reloc (bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
asymbol *symbol ATTRIBUTE_UNUSED,
|
||||
void * data,
|
||||
asection *input_section ATTRIBUTE_UNUSED,
|
||||
asection *input_section,
|
||||
bfd *output_bfd,
|
||||
char **error_message ATTRIBUTE_UNUSED)
|
||||
{
|
||||
@ -112,11 +117,11 @@ coff_arm_reloc (bfd *abfd,
|
||||
if (diff != 0)
|
||||
{
|
||||
reloc_howto_type *howto = reloc_entry->howto;
|
||||
unsigned char *addr = (unsigned char *) data + reloc_entry->address;
|
||||
bfd_size_type octets = (reloc_entry->address
|
||||
* OCTETS_PER_BYTE (abfd, input_section));
|
||||
unsigned char *addr = (unsigned char *) data + octets;
|
||||
|
||||
if (! bfd_reloc_offset_in_range (howto, abfd, input_section,
|
||||
reloc_entry->address
|
||||
* bfd_octets_per_byte (abfd)))
|
||||
if (!bfd_reloc_offset_in_range (howto, abfd, input_section, octets))
|
||||
return bfd_reloc_outofrange;
|
||||
|
||||
switch (howto->size)
|
||||
@ -814,7 +819,7 @@ coff_thumb_pcrel_12 (bfd *abfd,
|
||||
b12);
|
||||
}
|
||||
|
||||
static const struct reloc_howto_struct *
|
||||
static reloc_howto_type *
|
||||
coff_arm_reloc_type_lookup (bfd * abfd, bfd_reloc_code_real_type code)
|
||||
{
|
||||
#define ASTD(i,j) case i: return aoutarm_std_reloc_howto + j
|
||||
@ -1149,7 +1154,7 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e;
|
||||
|
||||
/* The standard COFF backend linker does not cope with the special
|
||||
Thumb BRANCH23 relocation. The alternative would be to split the
|
||||
BRANCH23 into seperate HI23 and LO23 relocations. However, it is a
|
||||
BRANCH23 into separate HI23 and LO23 relocations. However, it is a
|
||||
bit simpler simply providing our own relocation driver. */
|
||||
|
||||
/* The reloc processing routine for the ARM/Thumb COFF linker. NOTE:
|
||||
@ -1989,7 +1994,7 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
|
||||
sec = bfd_make_section_with_flags (abfd, ARM2THUMB_GLUE_SECTION_NAME,
|
||||
flags);
|
||||
if (sec == NULL
|
||||
|| ! bfd_set_section_alignment (abfd, sec, 2))
|
||||
|| !bfd_set_section_alignment (sec, 2))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -2003,7 +2008,7 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
|
||||
flags);
|
||||
|
||||
if (sec == NULL
|
||||
|| ! bfd_set_section_alignment (abfd, sec, 2))
|
||||
|| !bfd_set_section_alignment (sec, 2))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
29
external/gpl3/binutils/dist/bfd/coff-arm.h
vendored
Normal file
29
external/gpl3/binutils/dist/bfd/coff-arm.h
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/* BFD back-end for ARM COFF files.
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* ARM Interworking support. Called from linker. */
|
||||
extern bfd_boolean bfd_arm_allocate_interworking_sections
|
||||
(struct bfd_link_info *);
|
||||
|
||||
extern bfd_boolean bfd_arm_process_before_allocation
|
||||
(bfd *, struct bfd_link_info *, int);
|
||||
|
||||
extern bfd_boolean bfd_arm_get_bfd_for_interworking
|
||||
(bfd *, struct bfd_link_info *);
|
2
external/gpl3/binutils/dist/bfd/coff-bfd.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-bfd.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD COFF interfaces used outside of BFD.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
5
external/gpl3/binutils/dist/bfd/coff-bfd.h
vendored
5
external/gpl3/binutils/dist/bfd/coff-bfd.h
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD COFF interfaces used outside of BFD.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -86,3 +86,6 @@ extern bfd_boolean bfd_coff_get_syment
|
||||
|
||||
extern bfd_boolean bfd_coff_get_auxent
|
||||
(bfd *, struct bfd_symbol *, int, union internal_auxent *);
|
||||
|
||||
extern bfd_boolean bfd_coff_set_symbol_class
|
||||
(bfd *, struct bfd_symbol *, unsigned int);
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-go32.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-go32.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Intel 386 COFF files (DJGPP variant).
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by DJ Delorie.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
17
external/gpl3/binutils/dist/bfd/coff-i386.c
vendored
17
external/gpl3/binutils/dist/bfd/coff-i386.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Intel 386 COFF files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -41,6 +41,9 @@
|
||||
|
||||
#include "libcoff.h"
|
||||
|
||||
/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */
|
||||
#define OCTETS_PER_BYTE(ABFD, SEC) 1
|
||||
|
||||
static reloc_howto_type *coff_i386_rtype_to_howto
|
||||
(bfd *, asection *, struct internal_reloc *,
|
||||
struct coff_link_hash_entry *, struct internal_syment *,
|
||||
@ -67,7 +70,7 @@ coff_i386_reloc (bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
asymbol *symbol,
|
||||
void * data,
|
||||
asection *input_section ATTRIBUTE_UNUSED,
|
||||
asection *input_section,
|
||||
bfd *output_bfd,
|
||||
char **error_message ATTRIBUTE_UNUSED)
|
||||
{
|
||||
@ -142,11 +145,11 @@ coff_i386_reloc (bfd *abfd,
|
||||
if (diff != 0)
|
||||
{
|
||||
reloc_howto_type *howto = reloc_entry->howto;
|
||||
unsigned char *addr = (unsigned char *) data + reloc_entry->address;
|
||||
bfd_size_type octets = (reloc_entry->address
|
||||
* OCTETS_PER_BYTE (abfd, input_section));
|
||||
unsigned char *addr = (unsigned char *) data + octets;
|
||||
|
||||
if (! bfd_reloc_offset_in_range (howto, abfd, input_section,
|
||||
reloc_entry->address
|
||||
* bfd_octets_per_byte (abfd)))
|
||||
if (!bfd_reloc_offset_in_range (howto, abfd, input_section, octets))
|
||||
return bfd_reloc_outofrange;
|
||||
|
||||
switch (howto->size)
|
||||
@ -661,7 +664,7 @@ const bfd_target
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
|
||||
|
||||
/* Note that we allow an object file to be treated as a core file as well. */
|
||||
|
||||
|
||||
#ifdef COFF_CHECK_FORMAT
|
||||
{ /* bfd_check_format */
|
||||
_bfd_dummy_target,
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-ia64.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-ia64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for HP/Intel IA-64 COFF files.
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger <davidm@hpl.hp.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-mcore.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-mcore.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Motorola MCore COFF/PE
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
29
external/gpl3/binutils/dist/bfd/coff-mips.c
vendored
29
external/gpl3/binutils/dist/bfd/coff-mips.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for MIPS Extended-Coff files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Original version by Per Bothner.
|
||||
Full support added by Ian Lance Taylor, ian@cygnus.com.
|
||||
|
||||
@ -31,6 +31,9 @@
|
||||
#include "coff/mips.h"
|
||||
#include "libcoff.h"
|
||||
#include "libecoff.h"
|
||||
|
||||
/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */
|
||||
#define OCTETS_PER_BYTE(ABFD, SEC) 1
|
||||
|
||||
/* Prototypes for static functions. */
|
||||
static bfd_reloc_status_type
|
||||
@ -484,13 +487,13 @@ mips_refhi_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
relocation described above. */
|
||||
|
||||
static bfd_reloc_status_type
|
||||
mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
mips_reflo_reloc (bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
asymbol *symbol,
|
||||
void * data,
|
||||
asection *input_section,
|
||||
bfd *output_bfd,
|
||||
char **error_message ATTRIBUTE_UNUSED)
|
||||
char **error_message)
|
||||
{
|
||||
if (mips_refhi_list != NULL)
|
||||
{
|
||||
@ -503,11 +506,12 @@ mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
unsigned long val;
|
||||
unsigned long vallo;
|
||||
struct mips_hi *next;
|
||||
bfd_size_type octets = (reloc_entry->address
|
||||
* OCTETS_PER_BYTE (abfd, input_section));
|
||||
bfd_byte *loc = (bfd_byte *) data + octets;
|
||||
|
||||
if (! bfd_reloc_offset_in_range (reloc_entry->howto, abfd,
|
||||
input_section,
|
||||
reloc_entry->address
|
||||
* bfd_octets_per_byte (abfd)))
|
||||
if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd,
|
||||
input_section, octets))
|
||||
return bfd_reloc_outofrange;
|
||||
|
||||
/* Do the REFHI relocation. Note that we actually don't
|
||||
@ -515,8 +519,7 @@ mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
where to find the low 16 bits of the addend needed by the
|
||||
REFHI. */
|
||||
insn = bfd_get_32 (abfd, l->addr);
|
||||
vallo = (bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address)
|
||||
& 0xffff);
|
||||
vallo = bfd_get_32 (abfd, loc) & 0xffff;
|
||||
val = ((insn & 0xffff) << 16) + vallo;
|
||||
val += l->addend;
|
||||
|
||||
@ -544,7 +547,7 @@ mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
|
||||
/* Now do the REFLO reloc in the usual way. */
|
||||
return mips_generic_reloc (abfd, reloc_entry, symbol, data,
|
||||
input_section, output_bfd, error_message);
|
||||
input_section, output_bfd, error_message);
|
||||
}
|
||||
|
||||
/* Do a GPREL relocation. This is a 16 bit value which must become
|
||||
@ -1012,8 +1015,7 @@ mips_relocate_section (bfd *output_bfd,
|
||||
|
||||
/* Compute a new r_symndx value. */
|
||||
s = h->root.u.def.section;
|
||||
name = bfd_get_section_name (output_bfd,
|
||||
s->output_section);
|
||||
name = bfd_section_name (s->output_section);
|
||||
|
||||
int_rel.r_symndx = -1;
|
||||
switch (name[1])
|
||||
@ -1223,7 +1225,7 @@ mips_relocate_section (bfd *output_bfd,
|
||||
if (int_rel.r_extern)
|
||||
name = NULL;
|
||||
else
|
||||
name = bfd_section_name (input_bfd, s);
|
||||
name = bfd_section_name (s);
|
||||
(*info->callbacks->reloc_overflow)
|
||||
(info, (h ? &h->root : NULL), name, howto->name,
|
||||
(bfd_vma) 0, input_bfd, input_section,
|
||||
@ -1416,6 +1418,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
|
||||
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
|
||||
|
||||
#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
|
||||
#define _bfd_ecoff_bfd_group_name bfd_generic_group_name
|
||||
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
|
||||
#define _bfd_ecoff_section_already_linked \
|
||||
_bfd_coff_section_already_linked
|
||||
|
6
external/gpl3/binutils/dist/bfd/coff-ppc.c
vendored
6
external/gpl3/binutils/dist/bfd/coff-ppc.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for PowerPC Microsoft Portable Executable files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
|
||||
Original version pieced together by Kim Knuttila (krk@cygnus.com)
|
||||
|
||||
@ -2420,9 +2420,9 @@ ppc_bfd_coff_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
|
||||
_bfd_stringtab_free (flaginfo.strtab);
|
||||
|
||||
/* Setting bfd_get_symcount to 0 will cause write_object_contents to
|
||||
/* Setting symcount to 0 will cause write_object_contents to
|
||||
not try to write out the symbols. */
|
||||
bfd_get_symcount (abfd) = 0;
|
||||
abfd->symcount = 0;
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
150
external/gpl3/binutils/dist/bfd/coff-rs6000.c
vendored
150
external/gpl3/binutils/dist/bfd/coff-rs6000.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for IBM RS/6000 "XCOFF" files.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
|
||||
Archive support from Damon A. Permezel.
|
||||
Contributed by IBM Corporation and Cygnus Support.
|
||||
@ -114,7 +114,6 @@ extern int rs6000coff_core_file_failing_signal (bfd *abfd);
|
||||
#define bfd_pe_print_pdata NULL
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "coffcode.h"
|
||||
|
||||
/* The main body of code is in coffcode.h. */
|
||||
@ -1170,20 +1169,6 @@ _bfd_xcoff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
to take care that we are not generating the new form of archives
|
||||
on AIX 4.2 or earlier systems. */
|
||||
|
||||
/* XCOFF archives use this as a magic string. Note that both strings
|
||||
have the same length. */
|
||||
|
||||
/* Set the magic for archive. */
|
||||
|
||||
bfd_boolean
|
||||
bfd_xcoff_ar_archive_set_magic (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
char *magic ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* Not supported yet. */
|
||||
return FALSE;
|
||||
/* bfd_xcoff_archive_set_magic (abfd, magic); */
|
||||
}
|
||||
|
||||
/* PR 21786: The PE/COFF standard does not require NUL termination for any of
|
||||
the ASCII fields in the archive headers. So in order to be able to extract
|
||||
numerical values we provide our own versions of strtol and strtoll which
|
||||
@ -1215,19 +1200,19 @@ _bfd_strntoll (const char * nptr, int base, unsigned int maxlen)
|
||||
}
|
||||
|
||||
/* Macro to read an ASCII value stored in an archive header field. */
|
||||
#define GET_VALUE_IN_FIELD(VAR, FIELD) \
|
||||
do \
|
||||
{ \
|
||||
(VAR) = sizeof (VAR) > sizeof (long) \
|
||||
? _bfd_strntoll (FIELD, 10, sizeof FIELD) \
|
||||
: _bfd_strntol (FIELD, 10, sizeof FIELD); \
|
||||
} \
|
||||
#define GET_VALUE_IN_FIELD(VAR, FIELD, BASE) \
|
||||
do \
|
||||
{ \
|
||||
(VAR) = (sizeof (VAR) > sizeof (long) \
|
||||
? _bfd_strntoll (FIELD, BASE, sizeof FIELD) \
|
||||
: _bfd_strntol (FIELD, BASE, sizeof FIELD)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define EQ_VALUE_IN_FIELD(VAR, FIELD) \
|
||||
(sizeof (VAR) > sizeof (long) \
|
||||
? (VAR) ==_bfd_strntoll (FIELD, 10, sizeof FIELD) \
|
||||
: (VAR) == _bfd_strntol (FIELD, 10, sizeof FIELD))
|
||||
#define EQ_VALUE_IN_FIELD(VAR, FIELD, BASE) \
|
||||
(sizeof (VAR) > sizeof (long) \
|
||||
? (VAR) == _bfd_strntoll (FIELD, BASE, sizeof FIELD) \
|
||||
: (VAR) == _bfd_strntol (FIELD, BASE, sizeof FIELD))
|
||||
|
||||
/* Read in the armap of an XCOFF archive. */
|
||||
|
||||
@ -1244,7 +1229,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
|
||||
if (xcoff_ardata (abfd) == NULL)
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1253,10 +1238,10 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
/* This is for the old format. */
|
||||
struct xcoff_ar_hdr hdr;
|
||||
|
||||
GET_VALUE_IN_FIELD (off, xcoff_ardata (abfd)->symoff);
|
||||
GET_VALUE_IN_FIELD (off, xcoff_ardata (abfd)->symoff, 10);
|
||||
if (off == 0)
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1269,24 +1254,33 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
return FALSE;
|
||||
|
||||
/* Skip the name (normally empty). */
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen);
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10);
|
||||
off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG;
|
||||
if (bfd_seek (abfd, off, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
|
||||
GET_VALUE_IN_FIELD (sz, hdr.size);
|
||||
GET_VALUE_IN_FIELD (sz, hdr.size, 10);
|
||||
if (sz == (bfd_size_type) -1)
|
||||
{
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Read in the entire symbol table. */
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz);
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz + 1);
|
||||
if (contents == NULL)
|
||||
return FALSE;
|
||||
if (bfd_bread (contents, sz, abfd) != sz)
|
||||
return FALSE;
|
||||
|
||||
/* Ensure strings are NULL terminated so we don't wander off the
|
||||
end of the buffer. */
|
||||
contents[sz] = 0;
|
||||
|
||||
/* The symbol table starts with a four byte count. */
|
||||
c = H_GET_32 (abfd, contents);
|
||||
|
||||
if (c * 4 >= sz)
|
||||
if (c >= sz / 4)
|
||||
{
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return FALSE;
|
||||
@ -1308,10 +1302,10 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
/* This is for the new format. */
|
||||
struct xcoff_ar_hdr_big hdr;
|
||||
|
||||
GET_VALUE_IN_FIELD (off, xcoff_ardata_big (abfd)->symoff);
|
||||
GET_VALUE_IN_FIELD (off, xcoff_ardata_big (abfd)->symoff, 10);
|
||||
if (off == 0)
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1324,24 +1318,33 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
return FALSE;
|
||||
|
||||
/* Skip the name (normally empty). */
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen);
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10);
|
||||
off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG;
|
||||
if (bfd_seek (abfd, off, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
|
||||
GET_VALUE_IN_FIELD (sz, hdr.size);
|
||||
GET_VALUE_IN_FIELD (sz, hdr.size, 10);
|
||||
if (sz == (bfd_size_type) -1)
|
||||
{
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Read in the entire symbol table. */
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz);
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz + 1);
|
||||
if (contents == NULL)
|
||||
return FALSE;
|
||||
if (bfd_bread (contents, sz, abfd) != sz)
|
||||
return FALSE;
|
||||
|
||||
/* Ensure strings are NULL terminated so we don't wander off the
|
||||
end of the buffer. */
|
||||
contents[sz] = 0;
|
||||
|
||||
/* The symbol table starts with an eight byte count. */
|
||||
c = H_GET_64 (abfd, contents);
|
||||
|
||||
if (c * 8 >= sz)
|
||||
if (c >= sz / 8)
|
||||
{
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return FALSE;
|
||||
@ -1374,7 +1377,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd)
|
||||
}
|
||||
|
||||
bfd_ardata (abfd)->symdef_count = c;
|
||||
bfd_has_map (abfd) = TRUE;
|
||||
abfd->has_armap = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1435,7 +1438,7 @@ _bfd_xcoff_archive_p (bfd *abfd)
|
||||
}
|
||||
|
||||
GET_VALUE_IN_FIELD (bfd_ardata (abfd)->first_file_filepos,
|
||||
hdr.firstmemoff);
|
||||
hdr.firstmemoff, 10);
|
||||
|
||||
amt = SIZEOF_AR_FILE_HDR;
|
||||
bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
|
||||
@ -1510,7 +1513,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen);
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10);
|
||||
amt = SIZEOF_AR_HDR + namlen + 1;
|
||||
hdrp = (struct xcoff_ar_hdr *) bfd_alloc (abfd, amt);
|
||||
if (hdrp == NULL)
|
||||
@ -1527,7 +1530,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd)
|
||||
((char *) hdrp)[SIZEOF_AR_HDR + namlen] = '\0';
|
||||
|
||||
ret->arch_header = (char *) hdrp;
|
||||
GET_VALUE_IN_FIELD (ret->parsed_size, hdr.size);
|
||||
GET_VALUE_IN_FIELD (ret->parsed_size, hdr.size, 10);
|
||||
ret->filename = (char *) hdrp + SIZEOF_AR_HDR;
|
||||
}
|
||||
else
|
||||
@ -1542,7 +1545,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen);
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10);
|
||||
amt = SIZEOF_AR_HDR_BIG + namlen + 1;
|
||||
hdrp = (struct xcoff_ar_hdr_big *) bfd_alloc (abfd, amt);
|
||||
if (hdrp == NULL)
|
||||
@ -1559,7 +1562,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd)
|
||||
((char *) hdrp)[SIZEOF_AR_HDR_BIG + namlen] = '\0';
|
||||
|
||||
ret->arch_header = (char *) hdrp;
|
||||
GET_VALUE_IN_FIELD (ret->parsed_size, hdr.size);
|
||||
GET_VALUE_IN_FIELD (ret->parsed_size, hdr.size, 10);
|
||||
ret->filename = (char *) hdrp + SIZEOF_AR_HDR_BIG;
|
||||
}
|
||||
|
||||
@ -1588,11 +1591,11 @@ _bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file)
|
||||
if (last_file == NULL)
|
||||
filestart = bfd_ardata (archive)->first_file_filepos;
|
||||
else
|
||||
GET_VALUE_IN_FIELD (filestart, arch_xhdr (last_file)->nextoff);
|
||||
GET_VALUE_IN_FIELD (filestart, arch_xhdr (last_file)->nextoff, 10);
|
||||
|
||||
if (filestart == 0
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->memoff)
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->symoff))
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->memoff, 10)
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->symoff, 10))
|
||||
{
|
||||
bfd_set_error (bfd_error_no_more_archived_files);
|
||||
return NULL;
|
||||
@ -1603,11 +1606,11 @@ _bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file)
|
||||
if (last_file == NULL)
|
||||
filestart = bfd_ardata (archive)->first_file_filepos;
|
||||
else
|
||||
GET_VALUE_IN_FIELD (filestart, arch_xhdr_big (last_file)->nextoff);
|
||||
GET_VALUE_IN_FIELD (filestart, arch_xhdr_big (last_file)->nextoff, 10);
|
||||
|
||||
if (filestart == 0
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->memoff)
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->symoff))
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->memoff, 10)
|
||||
|| EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->symoff, 10))
|
||||
{
|
||||
bfd_set_error (bfd_error_no_more_archived_files);
|
||||
return NULL;
|
||||
@ -1632,20 +1635,20 @@ _bfd_xcoff_stat_arch_elt (bfd *abfd, struct stat *s)
|
||||
{
|
||||
struct xcoff_ar_hdr *hdrp = arch_xhdr (abfd);
|
||||
|
||||
GET_VALUE_IN_FIELD (s->st_mtime, hdrp->date);
|
||||
GET_VALUE_IN_FIELD (s->st_uid, hdrp->uid);
|
||||
GET_VALUE_IN_FIELD (s->st_gid, hdrp->gid);
|
||||
GET_VALUE_IN_FIELD (s->st_mode, hdrp->mode);
|
||||
GET_VALUE_IN_FIELD (s->st_mtime, hdrp->date, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_uid, hdrp->uid, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_gid, hdrp->gid, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_mode, hdrp->mode, 8);
|
||||
s->st_size = arch_eltdata (abfd)->parsed_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct xcoff_ar_hdr_big *hdrp = arch_xhdr_big (abfd);
|
||||
|
||||
GET_VALUE_IN_FIELD (s->st_mtime, hdrp->date);
|
||||
GET_VALUE_IN_FIELD (s->st_uid, hdrp->uid);
|
||||
GET_VALUE_IN_FIELD (s->st_gid, hdrp->gid);
|
||||
GET_VALUE_IN_FIELD (s->st_mode, hdrp->mode);
|
||||
GET_VALUE_IN_FIELD (s->st_mtime, hdrp->date, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_uid, hdrp->uid, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_gid, hdrp->gid, 10);
|
||||
GET_VALUE_IN_FIELD (s->st_mode, hdrp->mode, 8);
|
||||
s->st_size = arch_eltdata (abfd)->parsed_size;
|
||||
}
|
||||
|
||||
@ -3090,7 +3093,7 @@ xcoff_complain_overflow_bitfield_func (bfd *input_bfd,
|
||||
relies on it, and it is the only way to write assembler
|
||||
code which can run when loaded at a location 0x80000000
|
||||
away from the location at which it is linked. */
|
||||
if (howto->bitsize + howto->rightshift
|
||||
if ((unsigned) howto->bitsize + howto->rightshift
|
||||
== bfd_arch_bits_per_address (input_bfd))
|
||||
return FALSE;
|
||||
|
||||
@ -3458,10 +3461,6 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
|
||||
operation, which would be tedious, or we must do the computations
|
||||
in a type larger than bfd_vma, which would be inefficient. */
|
||||
|
||||
if ((unsigned int) howto.complain_on_overflow
|
||||
>= XCOFF_MAX_COMPLAIN_OVERFLOW)
|
||||
abort ();
|
||||
|
||||
if (((*xcoff_complain_overflow[howto.complain_on_overflow])
|
||||
(input_bfd, value_to_relocate, relocation, &howto)))
|
||||
{
|
||||
@ -3506,6 +3505,23 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* gcc-8 warns (*) on all the strncpy calls in this function about
|
||||
possible string truncation. The "truncation" is not a bug. We
|
||||
have an external representation of structs with fields that are not
|
||||
necessarily NULL terminated and corresponding internal
|
||||
representation fields that are one larger so that they can always
|
||||
be NULL terminated.
|
||||
gcc versions between 4.2 and 4.6 do not allow pragma control of
|
||||
diagnostics inside functions, giving a hard error if you try to use
|
||||
the finer control available with later versions.
|
||||
gcc prior to 4.2 warns about diagnostic push and pop.
|
||||
gcc-5, gcc-6 and gcc-7 warn that -Wstringop-truncation is unknown,
|
||||
unless you also add #pragma GCC diagnostic ignored "-Wpragma".
|
||||
(*) Depending on your system header files! */
|
||||
#if GCC_VERSION >= 8000
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
static bfd_boolean
|
||||
_bfd_xcoff_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
struct xcoff_loader_info *ldinfo,
|
||||
@ -3575,6 +3591,9 @@ _bfd_xcoff_put_symbol_name (struct bfd_link_info *info,
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#if GCC_VERSION >= 8000
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static asection *
|
||||
xcoff_create_csect_from_smclas (bfd *abfd,
|
||||
@ -4042,6 +4061,7 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
|
||||
#define _bfd_xcoff_bfd_lookup_section_flags bfd_generic_lookup_section_flags
|
||||
#define _bfd_xcoff_bfd_merge_sections bfd_generic_merge_sections
|
||||
#define _bfd_xcoff_bfd_is_group_section bfd_generic_is_group_section
|
||||
#define _bfd_xcoff_bfd_group_name bfd_generic_group_name
|
||||
#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
|
||||
#define _bfd_xcoff_section_already_linked _bfd_generic_section_already_linked
|
||||
#define _bfd_xcoff_bfd_define_common_symbol _bfd_xcoff_define_common_symbol
|
||||
|
18
external/gpl3/binutils/dist/bfd/coff-sh.c
vendored
18
external/gpl3/binutils/dist/bfd/coff-sh.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Renesas Super-H COFF binaries.
|
||||
Copyright (C) 1993-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
Written by Steve Chamberlain, <sac@cygnus.com>.
|
||||
Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
|
||||
@ -567,7 +567,7 @@ sh_reloc (bfd * abfd,
|
||||
bfd * output_bfd,
|
||||
char ** error_message ATTRIBUTE_UNUSED)
|
||||
{
|
||||
unsigned long insn;
|
||||
bfd_vma insn;
|
||||
bfd_vma sym_value;
|
||||
unsigned short r_type;
|
||||
bfd_vma addr = reloc_entry->address;
|
||||
@ -610,14 +610,14 @@ sh_reloc (bfd * abfd,
|
||||
#endif
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
insn += sym_value + reloc_entry->addend;
|
||||
bfd_put_32 (abfd, (bfd_vma) insn, hit_data);
|
||||
bfd_put_32 (abfd, insn, hit_data);
|
||||
break;
|
||||
#ifdef COFF_WITH_PE
|
||||
case R_SH_IMAGEBASE:
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
insn += sym_value + reloc_entry->addend;
|
||||
insn -= pe_data (input_section->output_section->owner)->pe_opthdr.ImageBase;
|
||||
bfd_put_32 (abfd, (bfd_vma) insn, hit_data);
|
||||
bfd_put_32 (abfd, insn, hit_data);
|
||||
break;
|
||||
#endif
|
||||
case R_SH_PCDISP:
|
||||
@ -627,12 +627,10 @@ sh_reloc (bfd * abfd,
|
||||
+ input_section->output_offset
|
||||
+ addr
|
||||
+ 4);
|
||||
sym_value += (insn & 0xfff) << 1;
|
||||
if (insn & 0x800)
|
||||
sym_value -= 0x1000;
|
||||
insn = (insn & 0xf000) | (sym_value & 0xfff);
|
||||
bfd_put_16 (abfd, (bfd_vma) insn, hit_data);
|
||||
if (sym_value < (bfd_vma) -0x1000 || sym_value >= 0x1000)
|
||||
sym_value += (((insn & 0xfff) ^ 0x800) - 0x800) << 1;
|
||||
insn = (insn & 0xf000) | ((sym_value >> 1) & 0xfff);
|
||||
bfd_put_16 (abfd, insn, hit_data);
|
||||
if (sym_value + 0x1000 >= 0x2000 || (sym_value & 1) != 0)
|
||||
return bfd_reloc_overflow;
|
||||
break;
|
||||
default:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub).
|
||||
Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
Written by Robert Hoehne.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-tic30.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-tic30.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for TMS320C30 coff binaries.
|
||||
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-tic4x.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-tic4x.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for TMS320C4X coff binaries.
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for TMS320C54X coff binaries.
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
Contributed by Timothy Wall (twall@cygnus.com)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -82,14 +82,14 @@ tic54x_getl_signed_32 (const void *p)
|
||||
#define coff_get_section_load_page bfd_ticoff_get_section_load_page
|
||||
#define coff_set_section_load_page bfd_ticoff_set_section_load_page
|
||||
|
||||
void
|
||||
static void
|
||||
bfd_ticoff_set_section_load_page (asection *sect,
|
||||
int page)
|
||||
{
|
||||
sect->lma = (sect->lma & ADDR_MASK) | PG_TO_FLAG(page);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
bfd_ticoff_get_section_load_page (asection *sect)
|
||||
{
|
||||
int page;
|
||||
|
19
external/gpl3/binutils/dist/bfd/coff-x86_64.c
vendored
19
external/gpl3/binutils/dist/bfd/coff-x86_64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for AMD 64 COFF files.
|
||||
Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -52,6 +52,9 @@
|
||||
|
||||
#define COFF_PAGE_SIZE 0x1000
|
||||
|
||||
/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */
|
||||
#define OCTETS_PER_BYTE(ABFD, SEC) 1
|
||||
|
||||
/* For some reason when using AMD COFF the value stored in the .text
|
||||
section for a reference to a common symbol is the value itself plus
|
||||
any desired offset. Ian Taylor, Cygnus Support. */
|
||||
@ -141,11 +144,11 @@ coff_amd64_reloc (bfd *abfd,
|
||||
if (diff != 0)
|
||||
{
|
||||
reloc_howto_type *howto = reloc_entry->howto;
|
||||
unsigned char *addr = (unsigned char *) data + reloc_entry->address;
|
||||
bfd_size_type octets = (reloc_entry->address
|
||||
* OCTETS_PER_BYTE (abfd, input_section));
|
||||
unsigned char *addr = (unsigned char *) data + octets;
|
||||
|
||||
if (! bfd_reloc_offset_in_range (howto, abfd, input_section,
|
||||
reloc_entry->address
|
||||
* bfd_octets_per_byte (abfd)))
|
||||
if (!bfd_reloc_offset_in_range (howto, abfd, input_section, octets))
|
||||
return bfd_reloc_outofrange;
|
||||
|
||||
switch (howto->size)
|
||||
@ -792,19 +795,19 @@ const bfd_target
|
||||
_bfd_dummy_target,
|
||||
amd64coff_object_p,
|
||||
bfd_generic_archive_p,
|
||||
amd64coff_object_p
|
||||
amd64coff_object_p
|
||||
},
|
||||
{ /* bfd_set_format. */
|
||||
_bfd_bool_bfd_false_error,
|
||||
coff_mkobject,
|
||||
_bfd_generic_mkarchive,
|
||||
_bfd_bool_bfd_false_error
|
||||
_bfd_bool_bfd_false_error
|
||||
},
|
||||
{ /* bfd_write_contents. */
|
||||
_bfd_bool_bfd_false_error,
|
||||
coff_write_object_contents,
|
||||
_bfd_write_archive_contents,
|
||||
_bfd_bool_bfd_false_error
|
||||
_bfd_bool_bfd_false_error
|
||||
},
|
||||
|
||||
BFD_JUMP_TABLE_GENERIC (coff),
|
||||
|
356
external/gpl3/binutils/dist/bfd/coff-z80.c
vendored
356
external/gpl3/binutils/dist/bfd/coff-z80.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Zilog Z80 COFF binaries.
|
||||
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2020 Free Software Foundation, Inc.
|
||||
Contributed by Arnold Metselaar <arnold_m@operamail.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -26,39 +26,204 @@
|
||||
#include "coff/z80.h"
|
||||
#include "coff/internal.h"
|
||||
#include "libcoff.h"
|
||||
#include "libiberty.h"
|
||||
|
||||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 0
|
||||
|
||||
static reloc_howto_type r_imm32 =
|
||||
HOWTO (R_IMM32, 0, 2, 32, FALSE, 0,
|
||||
complain_overflow_dont, 0, "r_imm32", TRUE, 0xffffffff, 0xffffffff,
|
||||
FALSE);
|
||||
typedef struct {
|
||||
bfd_reloc_code_real_type r_type;
|
||||
reloc_howto_type howto;
|
||||
} bfd_howto_type;
|
||||
|
||||
static reloc_howto_type r_imm24 =
|
||||
HOWTO (R_IMM24, 0, 1, 24, FALSE, 0,
|
||||
complain_overflow_dont, 0, "r_imm24", TRUE, 0x00ffffff, 0x00ffffff,
|
||||
FALSE);
|
||||
#define BFD_EMPTY_HOWTO(rt,x) {rt, EMPTY_HOWTO(x)}
|
||||
#define BFD_HOWTO(rt,a,b,c,d,e,f,g,h,i,j,k,l,m) {rt, HOWTO(a,b,c,d,e,f,g,h,i,j,k,l,m)}
|
||||
|
||||
static reloc_howto_type r_imm16 =
|
||||
HOWTO (R_IMM16, 0, 1, 16, FALSE, 0,
|
||||
complain_overflow_dont, 0, "r_imm16", TRUE, 0x0000ffff, 0x0000ffff,
|
||||
FALSE);
|
||||
static bfd_howto_type howto_table[] =
|
||||
{
|
||||
BFD_EMPTY_HOWTO (BFD_RELOC_NONE, 0),
|
||||
|
||||
static reloc_howto_type r_imm8 =
|
||||
HOWTO (R_IMM8, 0, 0, 8, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff,
|
||||
FALSE);
|
||||
BFD_HOWTO (BFD_RELOC_32,
|
||||
R_IMM32, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
static reloc_howto_type r_jr =
|
||||
HOWTO (R_JR, 0, 0, 8, TRUE, 0,
|
||||
complain_overflow_signed, 0, "r_jr", FALSE, 0, 0xFF,
|
||||
FALSE);
|
||||
BFD_HOWTO (BFD_RELOC_24,
|
||||
R_IMM24, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
24, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm24", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0x00ffffff, /* src_mask */
|
||||
0x00ffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
static reloc_howto_type r_off8 =
|
||||
HOWTO (R_OFF8, 0, 0, 8, FALSE, 0,
|
||||
complain_overflow_signed, 0,"r_off8", FALSE, 0, 0xff,
|
||||
FALSE);
|
||||
BFD_HOWTO (BFD_RELOC_16,
|
||||
R_IMM16, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm16", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_8,
|
||||
R_IMM8, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm8", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_8_PCREL,
|
||||
R_JR, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_jr", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xFF, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_DISP8,
|
||||
R_OFF8, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_off8", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE0,
|
||||
R_BYTE0, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte0", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE1,
|
||||
R_BYTE1, /* type */
|
||||
8, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte1", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE2,
|
||||
R_BYTE2, /* type */
|
||||
16, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte2", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE3,
|
||||
R_BYTE3, /* type */
|
||||
24, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte3", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_WORD0,
|
||||
R_WORD0, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_word0", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_WORD1,
|
||||
R_WORD1, /* type */
|
||||
16, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_word1", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
};
|
||||
|
||||
#define NUM_HOWTOS ARRAY_SIZE (howto_table)
|
||||
|
||||
#define BADMAG(x) Z80BADMAG(x)
|
||||
#define Z80 1 /* Customize coffcode.h. */
|
||||
@ -74,34 +239,19 @@ HOWTO (R_OFF8, 0, 0, 8, FALSE, 0,
|
||||
dst->r_stuff[1] = 'C';
|
||||
|
||||
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
|
||||
|
||||
static void
|
||||
rtype2howto (arelent *internal, struct internal_reloc *dst)
|
||||
{
|
||||
switch (dst->r_type)
|
||||
unsigned i;
|
||||
for (i = 0; i < NUM_HOWTOS; i++)
|
||||
{
|
||||
default:
|
||||
internal->howto = NULL;
|
||||
break;
|
||||
case R_IMM8:
|
||||
internal->howto = &r_imm8;
|
||||
break;
|
||||
case R_IMM16:
|
||||
internal->howto = &r_imm16;
|
||||
break;
|
||||
case R_IMM24:
|
||||
internal->howto = &r_imm24;
|
||||
break;
|
||||
case R_IMM32:
|
||||
internal->howto = &r_imm32;
|
||||
break;
|
||||
case R_JR:
|
||||
internal->howto = &r_jr;
|
||||
break;
|
||||
case R_OFF8:
|
||||
internal->howto = &r_off8;
|
||||
break;
|
||||
if (howto_table[i].howto.type == dst->r_type)
|
||||
{
|
||||
internal->howto = &howto_table[i].howto;
|
||||
return;
|
||||
}
|
||||
}
|
||||
internal->howto = NULL;
|
||||
}
|
||||
|
||||
#define RTYPE2HOWTO(internal, relocentry) rtype2howto (internal, relocentry)
|
||||
@ -110,35 +260,23 @@ static reloc_howto_type *
|
||||
coff_z80_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
bfd_reloc_code_real_type code)
|
||||
{
|
||||
switch (code)
|
||||
{
|
||||
case BFD_RELOC_8: return & r_imm8;
|
||||
case BFD_RELOC_16: return & r_imm16;
|
||||
case BFD_RELOC_24: return & r_imm24;
|
||||
case BFD_RELOC_32: return & r_imm32;
|
||||
case BFD_RELOC_8_PCREL: return & r_jr;
|
||||
case BFD_RELOC_Z80_DISP8: return & r_off8;
|
||||
default: BFD_FAIL ();
|
||||
return NULL;
|
||||
}
|
||||
unsigned i;
|
||||
for (i = 0; i < NUM_HOWTOS; i++)
|
||||
if (howto_table[i].r_type == code)
|
||||
return &howto_table[i].howto;
|
||||
|
||||
BFD_FAIL ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static reloc_howto_type *
|
||||
coff_z80_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
const char *r_name)
|
||||
{
|
||||
if (strcasecmp (r_imm8.name, r_name) == 0)
|
||||
return &r_imm8;
|
||||
if (strcasecmp (r_imm16.name, r_name) == 0)
|
||||
return &r_imm16;
|
||||
if (strcasecmp (r_imm24.name, r_name) == 0)
|
||||
return &r_imm24;
|
||||
if (strcasecmp (r_imm32.name, r_name) == 0)
|
||||
return &r_imm32;
|
||||
if (strcasecmp (r_jr.name, r_name) == 0)
|
||||
return &r_jr;
|
||||
if (strcasecmp (r_off8.name, r_name) == 0)
|
||||
return &r_off8;
|
||||
unsigned i;
|
||||
for (i = 0; i < NUM_HOWTOS; i++)
|
||||
if (strcasecmp(howto_table[i].howto.name, r_name) == 0)
|
||||
return &howto_table[i].howto;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -180,14 +318,15 @@ extra_case (bfd *in_abfd,
|
||||
unsigned int *dst_ptr)
|
||||
{
|
||||
asection * input_section = link_order->u.indirect.section;
|
||||
int val;
|
||||
int val = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
|
||||
|
||||
switch (reloc->howto->type)
|
||||
{
|
||||
case R_OFF8:
|
||||
val = bfd_coff_reloc16_get_value (reloc, link_info,
|
||||
input_section);
|
||||
if (val>127 || val<-128) /* Test for overflow. */
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += (signed char)(bfd_get_8 ( in_abfd, data+*src_ptr)
|
||||
& reloc->howto->src_mask);
|
||||
if (val>127 || val<-128) /* Test for overflow. */
|
||||
(*link_info->callbacks->reloc_overflow)
|
||||
(link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
|
||||
reloc->howto->name, reloc->addend, input_section->owner,
|
||||
@ -198,26 +337,55 @@ extra_case (bfd *in_abfd,
|
||||
(*src_ptr) += 1;
|
||||
break;
|
||||
|
||||
case R_BYTE3:
|
||||
bfd_put_8 (in_abfd, val >> 24, data + *dst_ptr);
|
||||
(*dst_ptr) += 1;
|
||||
(*src_ptr) += 1;
|
||||
break;
|
||||
|
||||
case R_BYTE2:
|
||||
bfd_put_8 (in_abfd, val >> 16, data + *dst_ptr);
|
||||
(*dst_ptr) += 1;
|
||||
(*src_ptr) += 1;
|
||||
break;
|
||||
|
||||
case R_BYTE1:
|
||||
bfd_put_8 (in_abfd, val >> 8, data + *dst_ptr);
|
||||
(*dst_ptr) += 1;
|
||||
(*src_ptr) += 1;
|
||||
break;
|
||||
|
||||
case R_IMM8:
|
||||
val = bfd_get_8 ( in_abfd, data+*src_ptr)
|
||||
+ bfd_coff_reloc16_get_value (reloc, link_info, input_section);
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += bfd_get_8 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask;
|
||||
//fallthrough
|
||||
case R_BYTE0:
|
||||
bfd_put_8 (in_abfd, val, data + *dst_ptr);
|
||||
(*dst_ptr) += 1;
|
||||
(*src_ptr) += 1;
|
||||
break;
|
||||
|
||||
case R_WORD1:
|
||||
bfd_put_16 (in_abfd, val >> 16, data + *dst_ptr);
|
||||
(*dst_ptr) += 2;
|
||||
(*src_ptr) += 2;
|
||||
break;
|
||||
|
||||
case R_IMM16:
|
||||
val = bfd_get_16 ( in_abfd, data+*src_ptr)
|
||||
+ bfd_coff_reloc16_get_value (reloc, link_info, input_section);
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += bfd_get_16 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask;
|
||||
//fallthrough
|
||||
case R_WORD0:
|
||||
bfd_put_16 (in_abfd, val, data + *dst_ptr);
|
||||
(*dst_ptr) += 2;
|
||||
(*src_ptr) += 2;
|
||||
break;
|
||||
|
||||
case R_IMM24:
|
||||
val = bfd_get_16 ( in_abfd, data+*src_ptr)
|
||||
+ (bfd_get_8 ( in_abfd, data+*src_ptr+2) << 16)
|
||||
+ bfd_coff_reloc16_get_value (reloc, link_info, input_section);
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += (bfd_get_16 ( in_abfd, data+*src_ptr)
|
||||
+ (bfd_get_8 ( in_abfd, data+*src_ptr+2) << 16))
|
||||
& reloc->howto->src_mask;
|
||||
bfd_put_16 (in_abfd, val, data + *dst_ptr);
|
||||
bfd_put_8 (in_abfd, val >> 16, data + *dst_ptr+2);
|
||||
(*dst_ptr) += 3;
|
||||
@ -225,8 +393,8 @@ extra_case (bfd *in_abfd,
|
||||
break;
|
||||
|
||||
case R_IMM32:
|
||||
val = bfd_get_32 ( in_abfd, data+*src_ptr)
|
||||
+ bfd_coff_reloc16_get_value (reloc, link_info, input_section);
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += bfd_get_32 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask;
|
||||
bfd_put_32 (in_abfd, val, data + *dst_ptr);
|
||||
(*dst_ptr) += 4;
|
||||
(*src_ptr) += 4;
|
||||
@ -234,15 +402,13 @@ extra_case (bfd *in_abfd,
|
||||
|
||||
case R_JR:
|
||||
{
|
||||
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
|
||||
input_section);
|
||||
if (reloc->howto->partial_inplace)
|
||||
val += (signed char)(bfd_get_8 ( in_abfd, data+*src_ptr)
|
||||
& reloc->howto->src_mask);
|
||||
bfd_vma dot = (*dst_ptr
|
||||
+ input_section->output_offset
|
||||
+ input_section->output_section->vma);
|
||||
int gap = dst - dot - 1; /* -1, Since the offset is relative
|
||||
to the value of PC after reading
|
||||
the offset. */
|
||||
|
||||
int gap = val - dot;
|
||||
if (gap >= 128 || gap < -128)
|
||||
(*link_info->callbacks->reloc_overflow)
|
||||
(link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
|
||||
@ -260,6 +426,16 @@ extra_case (bfd *in_abfd,
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
const char * name)
|
||||
{
|
||||
return (name[0] == '.' && name[1] == 'L') ||
|
||||
_bfd_coff_is_local_label_name (abfd, name);
|
||||
}
|
||||
|
||||
#define coff_bfd_is_local_label_name z80_is_local_label_name
|
||||
|
||||
#define coff_reloc16_extra_cases extra_case
|
||||
#define coff_bfd_reloc_type_lookup coff_z80_reloc_type_lookup
|
||||
#define coff_bfd_reloc_name_lookup coff_z80_reloc_name_lookup
|
||||
|
2
external/gpl3/binutils/dist/bfd/coff-z8k.c
vendored
2
external/gpl3/binutils/dist/bfd/coff-z8k.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for Zilog Z800n COFF binaries.
|
||||
Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
Written by Steve Chamberlain, <sac@cygnus.com>.
|
||||
|
||||
|
48
external/gpl3/binutils/dist/bfd/coff64-rs6000.c
vendored
48
external/gpl3/binutils/dist/bfd/coff64-rs6000.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for IBM RS/6000 "XCOFF64" files.
|
||||
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
Written Clinton Popetz.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
@ -278,7 +278,6 @@ extern int rs6000coff_core_file_failing_signal
|
||||
#define bfd_pe_print_pdata NULL
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "coffcode.h"
|
||||
|
||||
/* For XCOFF64, the effective width of symndx changes depending on
|
||||
@ -960,7 +959,7 @@ xcoff64_write_object_contents (bfd *abfd)
|
||||
if (text_sec != NULL)
|
||||
{
|
||||
internal_a.o_sntext = text_sec->target_index;
|
||||
internal_a.o_algntext = bfd_get_section_alignment (abfd, text_sec);
|
||||
internal_a.o_algntext = bfd_section_alignment (text_sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -971,7 +970,7 @@ xcoff64_write_object_contents (bfd *abfd)
|
||||
if (data_sec != NULL)
|
||||
{
|
||||
internal_a.o_sndata = data_sec->target_index;
|
||||
internal_a.o_algndata = bfd_get_section_alignment (abfd, data_sec);
|
||||
internal_a.o_algndata = bfd_section_alignment (data_sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1306,10 +1305,6 @@ xcoff64_ppc_relocate_section (bfd *output_bfd,
|
||||
operation, which would be tedious, or we must do the computations
|
||||
in a type larger than bfd_vma, which would be inefficient. */
|
||||
|
||||
if ((unsigned int) howto.complain_on_overflow
|
||||
>= XCOFF_MAX_COMPLAIN_OVERFLOW)
|
||||
abort ();
|
||||
|
||||
if (((*xcoff_complain_overflow[howto.complain_on_overflow])
|
||||
(input_bfd, value_to_relocate, relocation, &howto)))
|
||||
{
|
||||
@ -1883,13 +1878,13 @@ _bfd_strntoll (const char * nptr, int base, unsigned int maxlen)
|
||||
}
|
||||
|
||||
/* Macro to read an ASCII value stored in an archive header field. */
|
||||
#define GET_VALUE_IN_FIELD(VAR, FIELD) \
|
||||
do \
|
||||
{ \
|
||||
(VAR) = sizeof (VAR) > sizeof (long) \
|
||||
? _bfd_strntoll (FIELD, 10, sizeof FIELD) \
|
||||
: _bfd_strntol (FIELD, 10, sizeof FIELD); \
|
||||
} \
|
||||
#define GET_VALUE_IN_FIELD(VAR, FIELD, BASE) \
|
||||
do \
|
||||
{ \
|
||||
(VAR) = (sizeof (VAR) > sizeof (long) \
|
||||
? _bfd_strntoll (FIELD, BASE, sizeof FIELD) \
|
||||
: _bfd_strntol (FIELD, BASE, sizeof FIELD)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Read in the armap of an XCOFF archive. */
|
||||
@ -1911,7 +1906,7 @@ xcoff64_slurp_armap (bfd *abfd)
|
||||
|
||||
if (xcoff_ardata (abfd) == NULL)
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1919,7 +1914,7 @@ xcoff64_slurp_armap (bfd *abfd)
|
||||
(const char **) NULL, 10);
|
||||
if (off == 0)
|
||||
{
|
||||
bfd_has_map (abfd) = FALSE;
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1932,24 +1927,33 @@ xcoff64_slurp_armap (bfd *abfd)
|
||||
return FALSE;
|
||||
|
||||
/* Skip the name (normally empty). */
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen);
|
||||
GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10);
|
||||
pos = ((namlen + 1) & ~(size_t) 1) + SXCOFFARFMAG;
|
||||
if (bfd_seek (abfd, pos, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
|
||||
sz = bfd_scan_vma (hdr.size, (const char **) NULL, 10);
|
||||
if (sz == (bfd_size_type) -1)
|
||||
{
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Read in the entire symbol table. */
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz);
|
||||
contents = (bfd_byte *) bfd_alloc (abfd, sz + 1);
|
||||
if (contents == NULL)
|
||||
return FALSE;
|
||||
if (bfd_bread (contents, sz, abfd) != sz)
|
||||
return FALSE;
|
||||
|
||||
/* Ensure strings are NULL terminated so we don't wander off the end
|
||||
of the buffer. */
|
||||
contents[sz] = 0;
|
||||
|
||||
/* The symbol table starts with an eight byte count. */
|
||||
c = H_GET_64 (abfd, contents);
|
||||
|
||||
if (c * 8 >= sz)
|
||||
if (c >= sz / 8)
|
||||
{
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return FALSE;
|
||||
@ -1981,7 +1985,7 @@ xcoff64_slurp_armap (bfd *abfd)
|
||||
}
|
||||
|
||||
bfd_ardata (abfd)->symdef_count = c;
|
||||
bfd_has_map (abfd) = TRUE;
|
||||
abfd->has_armap = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -2783,6 +2787,7 @@ const bfd_target rs6000_xcoff64_vec =
|
||||
bfd_generic_lookup_section_flags,
|
||||
bfd_generic_merge_sections,
|
||||
bfd_generic_is_group_section,
|
||||
bfd_generic_group_name,
|
||||
bfd_generic_discard_group,
|
||||
_bfd_generic_section_already_linked,
|
||||
_bfd_xcoff_define_common_symbol,
|
||||
@ -3045,6 +3050,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
|
||||
bfd_generic_lookup_section_flags,
|
||||
bfd_generic_merge_sections,
|
||||
bfd_generic_is_group_section,
|
||||
bfd_generic_group_name,
|
||||
bfd_generic_discard_group,
|
||||
_bfd_generic_section_already_linked,
|
||||
_bfd_xcoff_define_common_symbol,
|
||||
|
108
external/gpl3/binutils/dist/bfd/coffgen.c
vendored
108
external/gpl3/binutils/dist/bfd/coffgen.c
vendored
@ -1,5 +1,5 @@
|
||||
/* Support for the generic parts of COFF, for BFD.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -37,6 +37,7 @@
|
||||
coff_data (abfd). */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <limits.h>
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "coff/internal.h"
|
||||
@ -216,7 +217,7 @@ make_a_section_from_file (bfd *abfd,
|
||||
break;
|
||||
}
|
||||
if (new_name != NULL)
|
||||
bfd_rename_section (abfd, return_section, new_name);
|
||||
bfd_rename_section (return_section, new_name);
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -256,14 +257,14 @@ coff_real_object_p (bfd *abfd,
|
||||
if ((internal_f->f_flags & F_EXEC) != 0)
|
||||
abfd->flags |= D_PAGED;
|
||||
|
||||
bfd_get_symcount (abfd) = internal_f->f_nsyms;
|
||||
abfd->symcount = internal_f->f_nsyms;
|
||||
if (internal_f->f_nsyms)
|
||||
abfd->flags |= HAS_SYMS;
|
||||
|
||||
if (internal_a != (struct internal_aouthdr *) NULL)
|
||||
bfd_get_start_address (abfd) = internal_a->entry;
|
||||
abfd->start_address = internal_a->entry;
|
||||
else
|
||||
bfd_get_start_address (abfd) = 0;
|
||||
abfd->start_address = 0;
|
||||
|
||||
/* Set up the tdata area. ECOFF uses its own routine, and overrides
|
||||
abfd->flags. */
|
||||
@ -301,14 +302,20 @@ coff_real_object_p (bfd *abfd,
|
||||
}
|
||||
}
|
||||
|
||||
obj_coff_keep_syms (abfd) = FALSE;
|
||||
obj_coff_keep_strings (abfd) = FALSE;
|
||||
_bfd_coff_free_symbols (abfd);
|
||||
return abfd->xvec;
|
||||
|
||||
fail:
|
||||
obj_coff_keep_syms (abfd) = FALSE;
|
||||
obj_coff_keep_strings (abfd) = FALSE;
|
||||
_bfd_coff_free_symbols (abfd);
|
||||
bfd_release (abfd, tdata);
|
||||
fail2:
|
||||
abfd->tdata.any = tdata_save;
|
||||
abfd->flags = oflags;
|
||||
bfd_get_start_address (abfd) = ostart;
|
||||
abfd->start_address = ostart;
|
||||
return (const bfd_target *) NULL;
|
||||
}
|
||||
|
||||
@ -835,7 +842,7 @@ coff_mangle_symbols (bfd *bfd_ptr)
|
||||
for (i = 0; i < s->u.syment.n_numaux; i++)
|
||||
{
|
||||
combined_entry_type *a = s + i + 1;
|
||||
|
||||
|
||||
BFD_ASSERT (! a->is_sym);
|
||||
if (a->fix_tag)
|
||||
{
|
||||
@ -1521,7 +1528,8 @@ coff_pointerize_aux (bfd *abfd,
|
||||
combined_entry_type *table_base,
|
||||
combined_entry_type *symbol,
|
||||
unsigned int indaux,
|
||||
combined_entry_type *auxent)
|
||||
combined_entry_type *auxent,
|
||||
combined_entry_type *table_end)
|
||||
{
|
||||
unsigned int type = symbol->u.syment.n_type;
|
||||
unsigned int n_sclass = symbol->u.syment.n_sclass;
|
||||
@ -1549,16 +1557,20 @@ coff_pointerize_aux (bfd *abfd,
|
||||
|| n_sclass == C_FCN)
|
||||
&& auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0
|
||||
&& auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l
|
||||
< (long) obj_raw_syment_count (abfd))
|
||||
< (long) obj_raw_syment_count (abfd)
|
||||
&& table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l
|
||||
< table_end)
|
||||
{
|
||||
auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p =
|
||||
table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
|
||||
auxent->fix_end = 1;
|
||||
}
|
||||
|
||||
/* A negative tagndx is meaningless, but the SCO 3.2v4 cc can
|
||||
generate one, so we must be careful to ignore it. */
|
||||
if ((unsigned long) auxent->u.auxent.x_sym.x_tagndx.l
|
||||
< obj_raw_syment_count (abfd))
|
||||
< obj_raw_syment_count (abfd)
|
||||
&& table_base + auxent->u.auxent.x_sym.x_tagndx.l < table_end)
|
||||
{
|
||||
auxent->u.auxent.x_sym.x_tagndx.p =
|
||||
table_base + auxent->u.auxent.x_sym.x_tagndx.l;
|
||||
@ -1808,10 +1820,11 @@ coff_get_normalized_symtab (bfd *abfd)
|
||||
if (! _bfd_coff_get_external_symbols (abfd))
|
||||
return NULL;
|
||||
|
||||
size = obj_raw_syment_count (abfd) * sizeof (combined_entry_type);
|
||||
size = obj_raw_syment_count (abfd);
|
||||
/* Check for integer overflow. */
|
||||
if (size < obj_raw_syment_count (abfd))
|
||||
if (size > (bfd_size_type) -1 / sizeof (combined_entry_type))
|
||||
return NULL;
|
||||
size *= sizeof (combined_entry_type);
|
||||
internal = (combined_entry_type *) bfd_zalloc (abfd, size);
|
||||
if (internal == NULL && size != 0)
|
||||
return NULL;
|
||||
@ -1838,29 +1851,20 @@ coff_get_normalized_symtab (bfd *abfd)
|
||||
symbol_ptr = internal_ptr;
|
||||
internal_ptr->is_sym = TRUE;
|
||||
|
||||
/* PR 17512: file: 1353-1166-0.004. */
|
||||
if (symbol_ptr->u.syment.n_sclass == C_FILE
|
||||
&& symbol_ptr->u.syment.n_numaux > 0
|
||||
&& raw_src + symesz + symbol_ptr->u.syment.n_numaux
|
||||
* symesz > raw_end)
|
||||
{
|
||||
bfd_release (abfd, internal);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0;
|
||||
i < symbol_ptr->u.syment.n_numaux;
|
||||
i++)
|
||||
{
|
||||
internal_ptr++;
|
||||
raw_src += symesz;
|
||||
|
||||
/* PR 17512: Prevent buffer overrun. */
|
||||
if (internal_ptr >= internal_end)
|
||||
if (raw_src >= raw_end || internal_ptr >= internal_end)
|
||||
{
|
||||
bfd_release (abfd, internal);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
raw_src += symesz;
|
||||
bfd_coff_swap_aux_in (abfd, (void *) raw_src,
|
||||
symbol_ptr->u.syment.n_type,
|
||||
symbol_ptr->u.syment.n_sclass,
|
||||
@ -1869,7 +1873,7 @@ coff_get_normalized_symtab (bfd *abfd)
|
||||
|
||||
internal_ptr->is_sym = FALSE;
|
||||
coff_pointerize_aux (abfd, internal, symbol_ptr, i,
|
||||
internal_ptr);
|
||||
internal_ptr, internal_end);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2009,6 +2013,13 @@ coff_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return -1;
|
||||
}
|
||||
#if SIZEOF_LONG == SIZEOF_INT
|
||||
if (asect->reloc_count >= LONG_MAX / sizeof (arelent *))
|
||||
{
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
return (asect->reloc_count + 1) * sizeof (arelent *);
|
||||
}
|
||||
|
||||
@ -2277,7 +2288,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
/* Also try examining DWARF2 debugging information. */
|
||||
if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
|
||||
filename_ptr, functionname_ptr,
|
||||
line_ptr, NULL, debug_sections, 0,
|
||||
line_ptr, NULL, debug_sections,
|
||||
&coff_data(abfd)->dwarf2_find_line_info))
|
||||
return TRUE;
|
||||
|
||||
@ -2289,7 +2300,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
information. So try again, using a bias against the address sought. */
|
||||
if (coff_data (abfd)->dwarf2_find_line_info != NULL)
|
||||
{
|
||||
bfd_signed_vma bias;
|
||||
bfd_signed_vma bias = 0;
|
||||
|
||||
/* Create a cache of the result for the next call. */
|
||||
if (sec_data == NULL && section->owner == abfd)
|
||||
@ -2301,10 +2312,11 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
|
||||
if (sec_data != NULL && sec_data->saved_bias)
|
||||
bias = sec_data->saved_bias;
|
||||
else
|
||||
else if (symbols)
|
||||
{
|
||||
bias = _bfd_dwarf2_find_symbol_bias (symbols,
|
||||
& coff_data (abfd)->dwarf2_find_line_info);
|
||||
|
||||
if (sec_data)
|
||||
{
|
||||
sec_data->saved_bias = TRUE;
|
||||
@ -2316,7 +2328,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
&& _bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section,
|
||||
offset + bias,
|
||||
filename_ptr, functionname_ptr,
|
||||
line_ptr, NULL, debug_sections, 0,
|
||||
line_ptr, NULL, debug_sections,
|
||||
&coff_data(abfd)->dwarf2_find_line_info))
|
||||
return TRUE;
|
||||
}
|
||||
@ -2352,7 +2364,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
bfd_vma maxdiff;
|
||||
|
||||
/* Look through the C_FILE symbols to find the best one. */
|
||||
sec_vma = bfd_get_section_vma (abfd, section);
|
||||
sec_vma = bfd_section_vma (section);
|
||||
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
|
||||
maxdiff = (bfd_vma) 0 - (bfd_vma) 1;
|
||||
while (1)
|
||||
@ -2394,13 +2406,16 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
||||
maxdiff = offset + sec_vma - p2->u.syment.n_value;
|
||||
}
|
||||
|
||||
if (p->u.syment.n_value >= cof->raw_syment_count)
|
||||
break;
|
||||
|
||||
/* Avoid endless loops on erroneous files by ensuring that
|
||||
we always move forward in the file. */
|
||||
if (p >= cof->raw_syments + p->u.syment.n_value)
|
||||
break;
|
||||
|
||||
p = cof->raw_syments + p->u.syment.n_value;
|
||||
if (p > pend || p->u.syment.n_sclass != C_FILE)
|
||||
if (!p->is_sym || p->u.syment.n_sclass != C_FILE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2633,6 +2648,9 @@ _bfd_coff_section_already_linked (bfd *abfd,
|
||||
struct bfd_section_already_linked_hash_entry *already_linked_list;
|
||||
struct coff_comdat_info *s_comdat;
|
||||
|
||||
if (sec->output_section == bfd_abs_section_ptr)
|
||||
return FALSE;
|
||||
|
||||
flags = sec->flags;
|
||||
if ((flags & SEC_LINK_ONCE) == 0)
|
||||
return FALSE;
|
||||
@ -2641,7 +2659,7 @@ _bfd_coff_section_already_linked (bfd *abfd,
|
||||
if ((flags & SEC_GROUP) != 0)
|
||||
return FALSE;
|
||||
|
||||
name = bfd_get_section_name (abfd, sec);
|
||||
name = bfd_section_name (sec);
|
||||
s_comdat = bfd_coff_get_comdat_section (abfd, sec);
|
||||
|
||||
if (s_comdat != NULL)
|
||||
@ -3138,3 +3156,29 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|
||||
/* ... and mark SEC_EXCLUDE for those that go. */
|
||||
return coff_gc_sweep (abfd, info);
|
||||
}
|
||||
|
||||
/* Return name used to identify a comdat group. */
|
||||
|
||||
const char *
|
||||
bfd_coff_group_name (bfd *abfd, const asection *sec)
|
||||
{
|
||||
struct coff_comdat_info *ci = bfd_coff_get_comdat_section (abfd, sec);
|
||||
if (ci != NULL)
|
||||
return ci->name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
_bfd_coff_close_and_cleanup (bfd *abfd)
|
||||
{
|
||||
if (abfd->format == bfd_object
|
||||
&& bfd_family_coff (abfd)
|
||||
&& coff_data (abfd) != NULL)
|
||||
{
|
||||
obj_coff_keep_syms (abfd) = FALSE;
|
||||
obj_coff_keep_strings (abfd) = FALSE;
|
||||
if (!_bfd_coff_free_symbols (abfd))
|
||||
return FALSE;
|
||||
}
|
||||
return _bfd_generic_close_and_cleanup (abfd);
|
||||
}
|
||||
|
29
external/gpl3/binutils/dist/bfd/cofflink.c
vendored
29
external/gpl3/binutils/dist/bfd/cofflink.c
vendored
@ -1,5 +1,5 @@
|
||||
/* COFF specific linker code.
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -221,7 +221,7 @@ coff_link_check_archive_element (bfd *abfd,
|
||||
return TRUE;
|
||||
*pneeded = TRUE;
|
||||
|
||||
return coff_link_add_object_symbols (abfd, info);
|
||||
return bfd_link_add_symbols (abfd, info);
|
||||
}
|
||||
|
||||
/* Add all the symbols from an object file to the hash table. */
|
||||
@ -310,7 +310,9 @@ coff_link_add_symbols (bfd *abfd,
|
||||
case COFF_SYMBOL_GLOBAL:
|
||||
flags = BSF_EXPORT | BSF_GLOBAL;
|
||||
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
|
||||
if (! obj_pe (abfd))
|
||||
if (discarded_section (section))
|
||||
section = bfd_und_section_ptr;
|
||||
else if (! obj_pe (abfd))
|
||||
value -= section->vma;
|
||||
break;
|
||||
|
||||
@ -327,6 +329,8 @@ coff_link_add_symbols (bfd *abfd,
|
||||
case COFF_SYMBOL_PE_SECTION:
|
||||
flags = BSF_SECTION_SYM | BSF_GLOBAL;
|
||||
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
|
||||
if (discarded_section (section))
|
||||
section = bfd_und_section_ptr;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -898,7 +902,7 @@ _bfd_coff_final_link (bfd *abfd,
|
||||
bfd_asymbol_name(sym), FALSE, FALSE)
|
||||
== NULL))
|
||||
|| (((flaginfo.info->discard == discard_sec_merge
|
||||
&& (bfd_get_section (sym)->flags & SEC_MERGE)
|
||||
&& (bfd_asymbol_section (sym)->flags & SEC_MERGE)
|
||||
&& ! bfd_link_relocatable (flaginfo.info))
|
||||
|| flaginfo.info->discard == discard_l)
|
||||
&& bfd_is_local_label_name (sub, bfd_asymbol_name(sym))))
|
||||
@ -1182,9 +1186,9 @@ _bfd_coff_final_link (bfd *abfd,
|
||||
|
||||
_bfd_stringtab_free (flaginfo.strtab);
|
||||
|
||||
/* Setting bfd_get_symcount to 0 will cause write_object_contents to
|
||||
/* Setting symcount to 0 will cause write_object_contents to
|
||||
not try to write out the symbols. */
|
||||
bfd_get_symcount (abfd) = 0;
|
||||
abfd->symcount = 0;
|
||||
|
||||
return TRUE;
|
||||
|
||||
@ -2537,7 +2541,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
|
||||
/* Write out the modified section contents. */
|
||||
if (secdata == NULL || secdata->stab_info == NULL)
|
||||
{
|
||||
file_ptr loc = o->output_offset * bfd_octets_per_byte (output_bfd);
|
||||
file_ptr loc = (o->output_offset
|
||||
* bfd_octets_per_byte (output_bfd, o));
|
||||
if (! bfd_set_section_contents (output_bfd, o->output_section,
|
||||
contents, loc, o->size))
|
||||
return FALSE;
|
||||
@ -2829,7 +2834,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
|
||||
return FALSE;
|
||||
|
||||
rstat = _bfd_relocate_contents (howto, output_bfd,
|
||||
(bfd_vma) link_order->u.reloc.p->addend,\
|
||||
(bfd_vma) link_order->u.reloc.p->addend,
|
||||
buf);
|
||||
switch (rstat)
|
||||
{
|
||||
@ -2842,14 +2847,14 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
|
||||
(*flaginfo->info->callbacks->reloc_overflow)
|
||||
(flaginfo->info, NULL,
|
||||
(link_order->type == bfd_section_reloc_link_order
|
||||
? bfd_section_name (output_bfd,
|
||||
link_order->u.reloc.p->u.section)
|
||||
? bfd_section_name (link_order->u.reloc.p->u.section)
|
||||
: link_order->u.reloc.p->u.name),
|
||||
howto->name, link_order->u.reloc.p->addend,
|
||||
(bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
|
||||
break;
|
||||
}
|
||||
loc = link_order->offset * bfd_octets_per_byte (output_bfd);
|
||||
loc = link_order->offset * bfd_octets_per_byte (output_bfd,
|
||||
output_section);
|
||||
ok = bfd_set_section_contents (output_bfd, output_section, buf,
|
||||
loc, size);
|
||||
free (buf);
|
||||
@ -3080,7 +3085,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
|
||||
if (sec != NULL && discarded_section (sec))
|
||||
{
|
||||
_bfd_clear_contents (howto, input_bfd, input_section,
|
||||
contents + (rel->r_vaddr - input_section->vma));
|
||||
contents, rel->r_vaddr - input_section->vma);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
8
external/gpl3/binutils/dist/bfd/coffswap.h
vendored
8
external/gpl3/binutils/dist/bfd/coffswap.h
vendored
@ -1,5 +1,5 @@
|
||||
/* Generic COFF swapping routines, for BFD.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -264,9 +264,6 @@ coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
|
||||
filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms);
|
||||
filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
|
||||
filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags);
|
||||
#ifdef TIC80_TARGET_ID
|
||||
filehdr_dst->f_target_id = H_GET_16 (abfd, filehdr_src->f_target_id);
|
||||
#endif
|
||||
|
||||
#ifdef COFF_ADJUST_FILEHDR_IN_POST
|
||||
COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
|
||||
@ -289,9 +286,6 @@ coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
|
||||
H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
|
||||
H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
|
||||
H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
|
||||
#ifdef TIC80_TARGET_ID
|
||||
H_PUT_16 (abfd, filehdr_in->f_target_id, filehdr_out->f_target_id);
|
||||
#endif
|
||||
|
||||
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
|
||||
COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
|
||||
|
58
external/gpl3/binutils/dist/bfd/compress.c
vendored
58
external/gpl3/binutils/dist/bfd/compress.c
vendored
@ -1,5 +1,5 @@
|
||||
/* Compressed section support (intended for debug sections).
|
||||
Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -84,11 +84,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
|
||||
int zlib_size = 0;
|
||||
int orig_compression_header_size;
|
||||
bfd_size_type orig_uncompressed_size;
|
||||
unsigned int orig_uncompressed_alignment_pow;
|
||||
int header_size = bfd_get_compression_header_size (abfd, NULL);
|
||||
bfd_boolean compressed
|
||||
= bfd_is_section_compressed_with_header (abfd, sec,
|
||||
&orig_compression_header_size,
|
||||
&orig_uncompressed_size);
|
||||
&orig_uncompressed_size,
|
||||
&orig_uncompressed_alignment_pow);
|
||||
|
||||
/* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size,
|
||||
overhead in .zdebug* section. */
|
||||
@ -153,6 +155,8 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
|
||||
return 0;
|
||||
}
|
||||
free (uncompressed_buffer);
|
||||
bfd_set_section_alignment (sec, orig_uncompressed_alignment_pow);
|
||||
|
||||
sec->contents = buffer;
|
||||
sec->compress_status = COMPRESS_SECTION_DONE;
|
||||
return orig_uncompressed_size;
|
||||
@ -245,6 +249,26 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
||||
case COMPRESS_SECTION_NONE:
|
||||
if (p == NULL)
|
||||
{
|
||||
ufile_ptr filesize = bfd_get_file_size (abfd);
|
||||
if (filesize > 0
|
||||
&& filesize < sz
|
||||
/* PR 24753: Linker created sections can be larger than
|
||||
the file size, eg if they are being used to hold stubs. */
|
||||
&& (bfd_section_flags (sec) & SEC_LINKER_CREATED) == 0
|
||||
/* The MMO file format supports its own special compression
|
||||
technique, but it uses COMPRESS_SECTION_NONE when loading
|
||||
a section's contents. */
|
||||
&& bfd_get_flavour (abfd) != bfd_target_mmo_flavour)
|
||||
{
|
||||
/* PR 24708: Avoid attempts to allocate a ridiculous amount
|
||||
of memory. */
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
(_("error: %pB(%pA) section size (%#" PRIx64 " bytes) is larger than file size (%#" PRIx64 " bytes)"),
|
||||
abfd, sec, (uint64_t) sz, (uint64_t) filesize);
|
||||
return FALSE;
|
||||
}
|
||||
p = (bfd_byte *) bfd_malloc (sz);
|
||||
if (p == NULL)
|
||||
{
|
||||
@ -364,20 +388,24 @@ SYNOPSIS
|
||||
bfd_boolean bfd_is_section_compressed_with_header
|
||||
(bfd *abfd, asection *section,
|
||||
int *compression_header_size_p,
|
||||
bfd_size_type *uncompressed_size_p);
|
||||
bfd_size_type *uncompressed_size_p,
|
||||
unsigned int *uncompressed_alignment_power_p);
|
||||
|
||||
DESCRIPTION
|
||||
Return @code{TRUE} if @var{section} is compressed. Compression
|
||||
header size is returned in @var{compression_header_size_p} and
|
||||
uncompressed size is returned in @var{uncompressed_size_p}. If
|
||||
compression is unsupported, compression header size is returned
|
||||
with -1 and uncompressed size is returned with 0.
|
||||
header size is returned in @var{compression_header_size_p},
|
||||
uncompressed size is returned in @var{uncompressed_size_p}
|
||||
and the uncompressed data alignement power is returned in
|
||||
@var{uncompressed_align_pow_p}. If compression is
|
||||
unsupported, compression header size is returned with -1
|
||||
and uncompressed size is returned with 0.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
|
||||
int *compression_header_size_p,
|
||||
bfd_size_type *uncompressed_size_p)
|
||||
bfd_size_type *uncompressed_size_p,
|
||||
unsigned int *uncompressed_align_pow_p)
|
||||
{
|
||||
bfd_byte header[MAX_COMPRESSION_HEADER_SIZE];
|
||||
int compression_header_size;
|
||||
@ -385,6 +413,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
|
||||
unsigned int saved = sec->compress_status;
|
||||
bfd_boolean compressed;
|
||||
|
||||
*uncompressed_align_pow_p = 0;
|
||||
|
||||
compression_header_size = bfd_get_compression_header_size (abfd, sec);
|
||||
if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
|
||||
abort ();
|
||||
@ -412,7 +442,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
|
||||
if (compression_header_size != 0)
|
||||
{
|
||||
if (!bfd_check_compression_header (abfd, header, sec,
|
||||
uncompressed_size_p))
|
||||
uncompressed_size_p,
|
||||
uncompressed_align_pow_p))
|
||||
compression_header_size = -1;
|
||||
}
|
||||
/* Check for the pathalogical case of a debug string section that
|
||||
@ -449,9 +480,11 @@ bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
|
||||
{
|
||||
int compression_header_size;
|
||||
bfd_size_type uncompressed_size;
|
||||
unsigned int uncompressed_align_power;
|
||||
return (bfd_is_section_compressed_with_header (abfd, sec,
|
||||
&compression_header_size,
|
||||
&uncompressed_size)
|
||||
&uncompressed_size,
|
||||
&uncompressed_align_power)
|
||||
&& compression_header_size >= 0
|
||||
&& uncompressed_size > 0);
|
||||
}
|
||||
@ -480,6 +513,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
||||
int compression_header_size;
|
||||
int header_size;
|
||||
bfd_size_type uncompressed_size;
|
||||
unsigned int uncompressed_alignment_power = 0;
|
||||
|
||||
compression_header_size = bfd_get_compression_header_size (abfd, sec);
|
||||
if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
|
||||
@ -508,7 +542,8 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
||||
uncompressed_size = bfd_getb64 (header + 4);
|
||||
}
|
||||
else if (!bfd_check_compression_header (abfd, header, sec,
|
||||
&uncompressed_size))
|
||||
&uncompressed_size,
|
||||
&uncompressed_alignment_power))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
@ -516,6 +551,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
||||
|
||||
sec->compressed_size = sec->size;
|
||||
sec->size = uncompressed_size;
|
||||
bfd_set_section_alignment (sec, uncompressed_alignment_power);
|
||||
sec->compress_status = DECOMPRESS_SECTION_SIZED;
|
||||
|
||||
return TRUE;
|
||||
|
3
external/gpl3/binutils/dist/bfd/config.in
vendored
3
external/gpl3/binutils/dist/bfd/config.in
vendored
@ -107,6 +107,9 @@
|
||||
/* Define to 1 if you have the `fileno' function. */
|
||||
#undef HAVE_FILENO
|
||||
|
||||
/* Define to 1 if you have the `fls' function. */
|
||||
#undef HAVE_FLS
|
||||
|
||||
/* Define to 1 if you have the `fopen64' function. */
|
||||
#undef HAVE_FOPEN64
|
||||
|
||||
|
@ -7,7 +7,7 @@ $!
|
||||
$! Written by Klaus K"ampf (kkaempf@rmi.de)
|
||||
$! Rewritten by Tristan Gingold (gingold@adacore.com)
|
||||
$!
|
||||
$! Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
$! Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
$!
|
||||
$! This file is free software; you can redistribute it and/or modify
|
||||
$! it under the terms of the GNU General Public License as published by
|
||||
|
10
external/gpl3/binutils/dist/bfd/corefile.c
vendored
10
external/gpl3/binutils/dist/bfd/corefile.c
vendored
@ -1,5 +1,5 @@
|
||||
/* Core file generic interface routines for BFD.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -157,9 +157,9 @@ DESCRIPTION
|
||||
bfd_boolean
|
||||
generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
||||
{
|
||||
char *exec;
|
||||
char *core;
|
||||
char *last_slash;
|
||||
const char *exec;
|
||||
const char *core;
|
||||
const char *last_slash;
|
||||
|
||||
if (exec_bfd == NULL || core_bfd == NULL)
|
||||
return TRUE;
|
||||
@ -169,7 +169,7 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
||||
non-const char *. In this case, the assignement does not lead to
|
||||
breaking the const, as we're only reading the string. */
|
||||
|
||||
core = (char *) bfd_core_file_failing_command (core_bfd);
|
||||
core = bfd_core_file_failing_command (core_bfd);
|
||||
if (core == NULL)
|
||||
return TRUE;
|
||||
|
||||
|
14
external/gpl3/binutils/dist/bfd/cpu-aarch64.c
vendored
14
external/gpl3/binutils/dist/bfd/cpu-aarch64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for AArch64.
|
||||
Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
Contributed by ARM Ltd.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -22,6 +22,7 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "cpu-aarch64.h"
|
||||
|
||||
/* This routine is provided two arch_infos and works out which Aarch64
|
||||
machine which would be compatible with both and returns a pointer
|
||||
@ -68,10 +69,11 @@ static struct
|
||||
}
|
||||
processors[] =
|
||||
{
|
||||
/* These two are example CPUs supported in GCC, once we have real
|
||||
CPUs they will be removed. */
|
||||
{ bfd_mach_aarch64, "example-1" },
|
||||
{ bfd_mach_aarch64, "example-2" }
|
||||
{ bfd_mach_aarch64, "cortex-a34" },
|
||||
{ bfd_mach_aarch64, "cortex-a65" },
|
||||
{ bfd_mach_aarch64, "cortex-a65ae" },
|
||||
{ bfd_mach_aarch64, "cortex-a76ae" },
|
||||
{ bfd_mach_aarch64, "cortex-a77" }
|
||||
};
|
||||
|
||||
static bfd_boolean
|
||||
@ -103,7 +105,7 @@ scan (const struct bfd_arch_info *info, const char *string)
|
||||
#define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT) \
|
||||
{ WORDSIZE, WORDSIZE, 8, bfd_arch_aarch64, NUMBER, \
|
||||
"aarch64", PRINT, 4, DEFAULT, compatible, scan, \
|
||||
bfd_arch_default_fill, NEXT }
|
||||
bfd_arch_default_fill, NEXT, 0 }
|
||||
|
||||
static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
|
||||
N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
|
||||
|
25
external/gpl3/binutils/dist/bfd/cpu-aarch64.h
vendored
Normal file
25
external/gpl3/binutils/dist/bfd/cpu-aarch64.h
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/* ELF AArch64 mapping symbol support
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING3. If not,
|
||||
see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
|
||||
extern bfd_boolean bfd_is_aarch64_special_symbol_name
|
||||
(const char * name, int type);
|
11
external/gpl3/binutils/dist/bfd/cpu-alpha.c
vendored
11
external/gpl3/binutils/dist/bfd/cpu-alpha.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Alpha architecture.
|
||||
Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,19 +24,20 @@
|
||||
|
||||
#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
BITS_WORD, /* bits in a word */ \
|
||||
BITS_ADDR, /* bits in an address */ \
|
||||
8, /* 8 bits in a byte */ \
|
||||
BITS_WORD, /* Bits in a word. */ \
|
||||
BITS_ADDR, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_alpha, \
|
||||
NUMBER, \
|
||||
"alpha", \
|
||||
PRINT, \
|
||||
3, \
|
||||
3, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
#define NN(index) (&arch_info_struct[index])
|
||||
|
13
external/gpl3/binutils/dist/bfd/cpu-arc.c
vendored
13
external/gpl3/binutils/dist/bfd/cpu-arc.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the ARC processor
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Contributed by Doug Evans (dje@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -27,20 +27,21 @@ static const bfd_arch_info_type *
|
||||
arc_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
|
||||
|
||||
#define ARC(mach, print_name, default_p, next) \
|
||||
{ \
|
||||
32, /* 32 bits in a word */ \
|
||||
32, /* 32 bits in an address */ \
|
||||
8, /* 8 bits in a byte */ \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_arc, \
|
||||
mach, \
|
||||
"arc", \
|
||||
print_name, \
|
||||
4, /* section alignment power */ \
|
||||
4, /* Section alignment power. */ \
|
||||
default_p, \
|
||||
arc_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
next, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
|
210
external/gpl3/binutils/dist/bfd/cpu-arm.c
vendored
210
external/gpl3/binutils/dist/bfd/cpu-arm.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the ARM processor
|
||||
Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -23,6 +23,7 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "cpu-arm.h"
|
||||
|
||||
/* This routine is provided two arch_infos and works out which ARM
|
||||
machine which would be compatible with both and returns a pointer
|
||||
@ -65,36 +66,132 @@ static struct
|
||||
}
|
||||
processors[] =
|
||||
{
|
||||
{ bfd_mach_arm_2, "arm2" },
|
||||
{ bfd_mach_arm_2a, "arm250" },
|
||||
{ bfd_mach_arm_2a, "arm3" },
|
||||
{ bfd_mach_arm_3, "arm6" },
|
||||
{ bfd_mach_arm_3, "arm60" },
|
||||
{ bfd_mach_arm_3, "arm600" },
|
||||
{ bfd_mach_arm_3, "arm610" },
|
||||
{ bfd_mach_arm_3, "arm7" },
|
||||
{ bfd_mach_arm_3, "arm710" },
|
||||
{ bfd_mach_arm_3, "arm7500" },
|
||||
{ bfd_mach_arm_3, "arm7d" },
|
||||
{ bfd_mach_arm_3, "arm7di" },
|
||||
{ bfd_mach_arm_3M, "arm7dm" },
|
||||
{ bfd_mach_arm_3M, "arm7dmi" },
|
||||
{ bfd_mach_arm_4T, "arm7tdmi" },
|
||||
{ bfd_mach_arm_4, "arm8" },
|
||||
{ bfd_mach_arm_4, "arm810" },
|
||||
{ bfd_mach_arm_4, "arm9" },
|
||||
{ bfd_mach_arm_4, "arm920" },
|
||||
{ bfd_mach_arm_4T, "arm920t" },
|
||||
{ bfd_mach_arm_4T, "arm9tdmi" },
|
||||
{ bfd_mach_arm_4, "sa1" },
|
||||
{ bfd_mach_arm_4, "strongarm"},
|
||||
{ bfd_mach_arm_4, "strongarm110" },
|
||||
{ bfd_mach_arm_4, "strongarm1100" },
|
||||
{ bfd_mach_arm_XScale, "xscale" },
|
||||
{ bfd_mach_arm_ep9312, "ep9312" },
|
||||
{ bfd_mach_arm_iWMMXt, "iwmmxt" },
|
||||
{ bfd_mach_arm_iWMMXt2, "iwmmxt2" },
|
||||
{ bfd_mach_arm_unknown, "arm_any" }
|
||||
{ bfd_mach_arm_2, "arm2" },
|
||||
{ bfd_mach_arm_2a, "arm250" },
|
||||
{ bfd_mach_arm_2a, "arm3" },
|
||||
{ bfd_mach_arm_3, "arm6" },
|
||||
{ bfd_mach_arm_3, "arm60" },
|
||||
{ bfd_mach_arm_3, "arm600" },
|
||||
{ bfd_mach_arm_3, "arm610" },
|
||||
{ bfd_mach_arm_3, "arm620" },
|
||||
{ bfd_mach_arm_3, "arm7" },
|
||||
{ bfd_mach_arm_3, "arm70" },
|
||||
{ bfd_mach_arm_3, "arm700" },
|
||||
{ bfd_mach_arm_3, "arm700i" },
|
||||
{ bfd_mach_arm_3, "arm710" },
|
||||
{ bfd_mach_arm_3, "arm7100" },
|
||||
{ bfd_mach_arm_3, "arm710c" },
|
||||
{ bfd_mach_arm_4T, "arm710t" },
|
||||
{ bfd_mach_arm_3, "arm720" },
|
||||
{ bfd_mach_arm_4T, "arm720t" },
|
||||
{ bfd_mach_arm_4T, "arm740t" },
|
||||
{ bfd_mach_arm_3, "arm7500" },
|
||||
{ bfd_mach_arm_3, "arm7500fe" },
|
||||
{ bfd_mach_arm_3, "arm7d" },
|
||||
{ bfd_mach_arm_3, "arm7di" },
|
||||
{ bfd_mach_arm_3M, "arm7dm" },
|
||||
{ bfd_mach_arm_3M, "arm7dmi" },
|
||||
{ bfd_mach_arm_4T, "arm7t" },
|
||||
{ bfd_mach_arm_4T, "arm7tdmi" },
|
||||
{ bfd_mach_arm_4T, "arm7tdmi-s" },
|
||||
{ bfd_mach_arm_3M, "arm7m" },
|
||||
{ bfd_mach_arm_4, "arm8" },
|
||||
{ bfd_mach_arm_4, "arm810" },
|
||||
{ bfd_mach_arm_4, "arm9" },
|
||||
{ bfd_mach_arm_4T, "arm920" },
|
||||
{ bfd_mach_arm_4T, "arm920t" },
|
||||
{ bfd_mach_arm_4T, "arm922t" },
|
||||
{ bfd_mach_arm_5TEJ, "arm926ej" },
|
||||
{ bfd_mach_arm_5TEJ, "arm926ejs" },
|
||||
{ bfd_mach_arm_5TEJ, "arm926ej-s" },
|
||||
{ bfd_mach_arm_4T, "arm940t" },
|
||||
{ bfd_mach_arm_5TE, "arm946e" },
|
||||
{ bfd_mach_arm_5TE, "arm946e-r0" },
|
||||
{ bfd_mach_arm_5TE, "arm946e-s" },
|
||||
{ bfd_mach_arm_5TE, "arm966e" },
|
||||
{ bfd_mach_arm_5TE, "arm966e-r0" },
|
||||
{ bfd_mach_arm_5TE, "arm966e-s" },
|
||||
{ bfd_mach_arm_5TE, "arm968e-s" },
|
||||
{ bfd_mach_arm_5TE, "arm9e" },
|
||||
{ bfd_mach_arm_5TE, "arm9e-r0" },
|
||||
{ bfd_mach_arm_4T, "arm9tdmi" },
|
||||
{ bfd_mach_arm_5TE, "arm1020" },
|
||||
{ bfd_mach_arm_5T, "arm1020t" },
|
||||
{ bfd_mach_arm_5TE, "arm1020e" },
|
||||
{ bfd_mach_arm_5TE, "arm1022e" },
|
||||
{ bfd_mach_arm_5TEJ, "arm1026ejs" },
|
||||
{ bfd_mach_arm_5TEJ, "arm1026ej-s" },
|
||||
{ bfd_mach_arm_5TE, "arm10e" },
|
||||
{ bfd_mach_arm_5T, "arm10t" },
|
||||
{ bfd_mach_arm_5T, "arm10tdmi" },
|
||||
{ bfd_mach_arm_6, "arm1136j-s" },
|
||||
{ bfd_mach_arm_6, "arm1136js" },
|
||||
{ bfd_mach_arm_6, "arm1136jf-s" },
|
||||
{ bfd_mach_arm_6, "arm1136jfs" },
|
||||
{ bfd_mach_arm_6KZ, "arm1176jz-s" },
|
||||
{ bfd_mach_arm_6KZ, "arm1176jzf-s" },
|
||||
{ bfd_mach_arm_6T2, "arm1156t2-s" },
|
||||
{ bfd_mach_arm_6T2, "arm1156t2f-s" },
|
||||
{ bfd_mach_arm_7, "cortex-a5" },
|
||||
{ bfd_mach_arm_7, "cortex-a7" },
|
||||
{ bfd_mach_arm_7, "cortex-a8" },
|
||||
{ bfd_mach_arm_7, "cortex-a9" },
|
||||
{ bfd_mach_arm_7, "cortex-a12" },
|
||||
{ bfd_mach_arm_7, "cortex-a15" },
|
||||
{ bfd_mach_arm_7, "cortex-a17" },
|
||||
{ bfd_mach_arm_8, "cortex-a32" },
|
||||
{ bfd_mach_arm_8, "cortex-a35" },
|
||||
{ bfd_mach_arm_8, "cortex-a53" },
|
||||
{ bfd_mach_arm_8, "cortex-a55" },
|
||||
{ bfd_mach_arm_8, "cortex-a57" },
|
||||
{ bfd_mach_arm_8, "cortex-a72" },
|
||||
{ bfd_mach_arm_8, "cortex-a73" },
|
||||
{ bfd_mach_arm_8, "cortex-a75" },
|
||||
{ bfd_mach_arm_8, "cortex-a76" },
|
||||
{ bfd_mach_arm_8, "cortex-a76ae" },
|
||||
{ bfd_mach_arm_8, "cortex-a77" },
|
||||
{ bfd_mach_arm_6SM, "cortex-m0" },
|
||||
{ bfd_mach_arm_6SM, "cortex-m0plus" },
|
||||
{ bfd_mach_arm_6SM, "cortex-m1" },
|
||||
{ bfd_mach_arm_8M_BASE, "cortex-m23" },
|
||||
{ bfd_mach_arm_7, "cortex-m3" },
|
||||
{ bfd_mach_arm_8M_MAIN, "cortex-m33" },
|
||||
{ bfd_mach_arm_8M_MAIN, "cortex-m35p" },
|
||||
{ bfd_mach_arm_7EM, "cortex-m4" },
|
||||
{ bfd_mach_arm_7EM, "cortex-m7" },
|
||||
{ bfd_mach_arm_7, "cortex-r4" },
|
||||
{ bfd_mach_arm_7, "cortex-r4f" },
|
||||
{ bfd_mach_arm_7, "cortex-r5" },
|
||||
{ bfd_mach_arm_8R, "cortex-r52" },
|
||||
{ bfd_mach_arm_7, "cortex-r7" },
|
||||
{ bfd_mach_arm_7, "cortex-r8" },
|
||||
{ bfd_mach_arm_4T, "ep9312" },
|
||||
{ bfd_mach_arm_8, "exynos-m1" },
|
||||
{ bfd_mach_arm_4, "fa526" },
|
||||
{ bfd_mach_arm_5TE, "fa606te" },
|
||||
{ bfd_mach_arm_5TE, "fa616te" },
|
||||
{ bfd_mach_arm_4, "fa626" },
|
||||
{ bfd_mach_arm_5TE, "fa626te" },
|
||||
{ bfd_mach_arm_5TE, "fa726te" },
|
||||
{ bfd_mach_arm_5TE, "fmp626" },
|
||||
{ bfd_mach_arm_XScale, "i80200" },
|
||||
{ bfd_mach_arm_7, "marvell-pj4" },
|
||||
{ bfd_mach_arm_7, "marvell-whitney" },
|
||||
{ bfd_mach_arm_6K, "mpcore" },
|
||||
{ bfd_mach_arm_6K, "mpcorenovfp" },
|
||||
{ bfd_mach_arm_4, "sa1" },
|
||||
{ bfd_mach_arm_4, "strongarm" },
|
||||
{ bfd_mach_arm_4, "strongarm1" },
|
||||
{ bfd_mach_arm_4, "strongarm110" },
|
||||
{ bfd_mach_arm_4, "strongarm1100" },
|
||||
{ bfd_mach_arm_4, "strongarm1110" },
|
||||
{ bfd_mach_arm_XScale, "xscale" },
|
||||
{ bfd_mach_arm_8, "xgene1" },
|
||||
{ bfd_mach_arm_8, "xgene2" },
|
||||
{ bfd_mach_arm_ep9312, "ep9312" },
|
||||
{ bfd_mach_arm_iWMMXt, "iwmmxt" },
|
||||
{ bfd_mach_arm_iWMMXt2, "iwmmxt2" },
|
||||
{ bfd_mach_arm_unknown, "arm_any" }
|
||||
};
|
||||
|
||||
static bfd_boolean
|
||||
@ -125,24 +222,38 @@ scan (const struct bfd_arch_info *info, const char *string)
|
||||
|
||||
#define N(number, print, default, next) \
|
||||
{ 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, \
|
||||
scan, bfd_arch_default_fill, next }
|
||||
scan, bfd_arch_default_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (bfd_mach_arm_2, "armv2", FALSE, & arch_info_struct[1]),
|
||||
N (bfd_mach_arm_2a, "armv2a", FALSE, & arch_info_struct[2]),
|
||||
N (bfd_mach_arm_3, "armv3", FALSE, & arch_info_struct[3]),
|
||||
N (bfd_mach_arm_3M, "armv3m", FALSE, & arch_info_struct[4]),
|
||||
N (bfd_mach_arm_4, "armv4", FALSE, & arch_info_struct[5]),
|
||||
N (bfd_mach_arm_4T, "armv4t", FALSE, & arch_info_struct[6]),
|
||||
N (bfd_mach_arm_5, "armv5", FALSE, & arch_info_struct[7]),
|
||||
N (bfd_mach_arm_5T, "armv5t", FALSE, & arch_info_struct[8]),
|
||||
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]),
|
||||
N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]),
|
||||
N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]),
|
||||
N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]),
|
||||
N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]),
|
||||
N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL)
|
||||
N (bfd_mach_arm_2, "armv2", FALSE, & arch_info_struct[1]),
|
||||
N (bfd_mach_arm_2a, "armv2a", FALSE, & arch_info_struct[2]),
|
||||
N (bfd_mach_arm_3, "armv3", FALSE, & arch_info_struct[3]),
|
||||
N (bfd_mach_arm_3M, "armv3m", FALSE, & arch_info_struct[4]),
|
||||
N (bfd_mach_arm_4, "armv4", FALSE, & arch_info_struct[5]),
|
||||
N (bfd_mach_arm_4T, "armv4t", FALSE, & arch_info_struct[6]),
|
||||
N (bfd_mach_arm_5, "armv5", FALSE, & arch_info_struct[7]),
|
||||
N (bfd_mach_arm_5T, "armv5t", FALSE, & arch_info_struct[8]),
|
||||
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]),
|
||||
N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]),
|
||||
N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]),
|
||||
N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]),
|
||||
N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]),
|
||||
N (bfd_mach_arm_5TEJ, "armv5tej", FALSE, & arch_info_struct[14]),
|
||||
N (bfd_mach_arm_6, "armv6", FALSE, & arch_info_struct[15]),
|
||||
N (bfd_mach_arm_6KZ, "armv6kz", FALSE, & arch_info_struct[16]),
|
||||
N (bfd_mach_arm_6T2, "armv6t2", FALSE, & arch_info_struct[17]),
|
||||
N (bfd_mach_arm_6K, "armv6k", FALSE, & arch_info_struct[18]),
|
||||
N (bfd_mach_arm_7, "armv7", FALSE, & arch_info_struct[19]),
|
||||
N (bfd_mach_arm_6M, "armv6-m", FALSE, & arch_info_struct[20]),
|
||||
N (bfd_mach_arm_6SM, "armv6s-m", FALSE, & arch_info_struct[21]),
|
||||
N (bfd_mach_arm_7EM, "armv7e-m", FALSE, & arch_info_struct[22]),
|
||||
N (bfd_mach_arm_8, "armv8-a", FALSE, & arch_info_struct[23]),
|
||||
N (bfd_mach_arm_8R, "armv8-r", FALSE, & arch_info_struct[24]),
|
||||
N (bfd_mach_arm_8M_BASE, "armv8-m.base", FALSE, & arch_info_struct[25]),
|
||||
N (bfd_mach_arm_8M_MAIN, "armv8-m.main", FALSE, & arch_info_struct[26]),
|
||||
N (bfd_mach_arm_8_1M_MAIN, "armv8.1-m.main", FALSE, & arch_info_struct[27]),
|
||||
N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL)
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_arm_arch =
|
||||
@ -304,7 +415,9 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
|
||||
if (! arm_check_note (abfd, buffer, buffer_size, NOTE_ARCH_STRING, & arch_string))
|
||||
goto FAIL;
|
||||
|
||||
/* Check the architecture in the note against the architecture of the bfd. */
|
||||
/* Check the architecture in the note against the architecture of the bfd.
|
||||
Newer architectures versions should not be added here as build attribute
|
||||
are a better mechanism to convey ISA used. */
|
||||
switch (bfd_get_mach (abfd))
|
||||
{
|
||||
default:
|
||||
@ -356,6 +469,9 @@ static struct
|
||||
const char * string;
|
||||
unsigned int mach;
|
||||
}
|
||||
|
||||
/* Newer architectures versions should not be added here as build attribute are
|
||||
a better mechanism to convey ISA used. */
|
||||
architectures[] =
|
||||
{
|
||||
{ "armv2", bfd_mach_arm_2 },
|
||||
|
39
external/gpl3/binutils/dist/bfd/cpu-arm.h
vendored
Normal file
39
external/gpl3/binutils/dist/bfd/cpu-arm.h
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/* BFD support for the ARM processor
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* ARM Note section processing. */
|
||||
extern bfd_boolean bfd_arm_merge_machines
|
||||
(bfd *, bfd *);
|
||||
|
||||
extern bfd_boolean bfd_arm_update_notes
|
||||
(bfd *, const char *);
|
||||
|
||||
extern unsigned int bfd_arm_get_mach_from_notes
|
||||
(bfd *, const char *);
|
||||
|
||||
/* ELF ARM mapping symbol support. */
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
|
||||
#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
|
||||
|
||||
extern bfd_boolean bfd_is_arm_special_symbol_name
|
||||
(const char *, int);
|
||||
|
11
external/gpl3/binutils/dist/bfd/cpu-avr.c
vendored
11
external/gpl3/binutils/dist/bfd/cpu-avr.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD library support routines for the AVR architecture.
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
Contributed by Denis Chertykov <denisc@overta.ru>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -82,9 +82,9 @@ compatible (const bfd_arch_info_type * a,
|
||||
|
||||
#define N(addr_bits, machine, print, default, next) \
|
||||
{ \
|
||||
8, /* 8 bits in a word. */ \
|
||||
addr_bits, /* bits in an address. */ \
|
||||
8, /* 8 bits in a byte. */ \
|
||||
8, /* Bits in a word. */ \
|
||||
addr_bits, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_avr, \
|
||||
machine, /* Machine number. */ \
|
||||
"avr", /* Architecture name. */ \
|
||||
@ -94,7 +94,8 @@ compatible (const bfd_arch_info_type * a,
|
||||
compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
next \
|
||||
next, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
|
5
external/gpl3/binutils/dist/bfd/cpu-bfin.c
vendored
5
external/gpl3/binutils/dist/bfd/cpu-bfin.c
vendored
@ -1,6 +1,6 @@
|
||||
/* BFD Support for the ADI Blackfin processor.
|
||||
|
||||
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -37,5 +37,6 @@ const bfd_arch_info_type bfd_bfin_arch =
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
42
external/gpl3/binutils/dist/bfd/cpu-bpf.c
vendored
Normal file
42
external/gpl3/binutils/dist/bfd/cpu-bpf.c
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/* BFD support for the BPF processor.
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
Contributed by Oracle Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
const bfd_arch_info_type bfd_bpf_arch =
|
||||
{
|
||||
64, /* Bits per word. */
|
||||
64, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_bpf, /* Architecture. */
|
||||
bfd_mach_bpf, /* Machine. */
|
||||
"bpf", /* Architecture name. */
|
||||
"bpf", /* Machine name. */
|
||||
3, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL, /* Next in list. */
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
33
external/gpl3/binutils/dist/bfd/cpu-cr16.c
vendored
33
external/gpl3/binutils/dist/bfd/cpu-cr16.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the CR16 processor.
|
||||
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
Written by M R Swami Reddy
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -24,18 +24,19 @@
|
||||
|
||||
|
||||
const bfd_arch_info_type bfd_cr16_arch =
|
||||
{
|
||||
16, /* 16 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_cr16, /* enum bfd_architecture arch. */
|
||||
bfd_mach_cr16,
|
||||
"cr16", /* Arch name. */
|
||||
"cr16", /* Printable name. */
|
||||
1, /* Unsigned int section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
{
|
||||
16, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_cr16, /* Architecture number. */
|
||||
bfd_mach_cr16,
|
||||
"cr16", /* Arch name. */
|
||||
"cr16", /* Printable name. */
|
||||
1, /* Section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
7
external/gpl3/binutils/dist/bfd/cpu-cris.c
vendored
7
external/gpl3/binutils/dist/bfd/cpu-cris.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Axis CRIS architecture.
|
||||
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
Contributed by Axis Communications AB.
|
||||
Written by Hans-Peter Nilsson.
|
||||
|
||||
@ -67,7 +67,7 @@ get_compatible (const bfd_arch_info_type *a,
|
||||
|
||||
#define N(NUMBER, PRINT, NEXT) \
|
||||
{ 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \
|
||||
get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT }
|
||||
get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT, 0 }
|
||||
|
||||
static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 =
|
||||
N (bfd_mach_cris_v10_v32, "cris:common_v10_v32", NULL);
|
||||
@ -97,8 +97,9 @@ const bfd_arch_info_type bfd_cris_arch =
|
||||
bfd_default_scan, /* Check if a bfd_arch_info_type is a
|
||||
match. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
&bfd_cris_arch_v32 /* Pointer to next bfd_arch_info_type in
|
||||
&bfd_cris_arch_v32, /* Pointer to next bfd_arch_info_type in
|
||||
the same family. */
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
||||
/*
|
||||
|
33
external/gpl3/binutils/dist/bfd/cpu-crx.c
vendored
33
external/gpl3/binutils/dist/bfd/cpu-crx.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the CRX processor.
|
||||
Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,18 +24,19 @@
|
||||
|
||||
|
||||
const bfd_arch_info_type bfd_crx_arch =
|
||||
{
|
||||
16, /* 16 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_crx, /* enum bfd_architecture arch. */
|
||||
bfd_mach_crx,
|
||||
"crx", /* Arch name. */
|
||||
"crx", /* Printable name. */
|
||||
1, /* Unsigned int section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
{
|
||||
16, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_crx, /* Architecture number. */
|
||||
bfd_mach_crx,
|
||||
"crx", /* Arch name. */
|
||||
"crx", /* Printable name. */
|
||||
1, /* Section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
60
external/gpl3/binutils/dist/bfd/cpu-csky.c
vendored
Normal file
60
external/gpl3/binutils/dist/bfd/cpu-csky.c
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/* BFD support for C-SKY processors.
|
||||
Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
Contributed by C-SKY Microsystems and Mentor Graphics.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, ISDEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_csky, /* Architecture. */ \
|
||||
NUMBER, /* Machine number. */ \
|
||||
"csky", /* Architecture name. */ \
|
||||
PRINT, /* Printable name. */ \
|
||||
3, /* Section align power. */ \
|
||||
ISDEFAULT, /* Is this the default architecture ? */ \
|
||||
bfd_default_compatible, /* Architecture comparison function. */ \
|
||||
bfd_default_scan, /* String to architecture conversion. */ \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, /* Next in list. */ \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
/* ABI v1 processors. */
|
||||
N (bfd_mach_ck510, "csky:ck510", FALSE, & arch_info_struct[1]),
|
||||
N (bfd_mach_ck610, "csky:ck610", FALSE, & arch_info_struct[2]),
|
||||
|
||||
/* ABI v2 processors. */
|
||||
N (bfd_mach_ck801, "csky:ck801", FALSE, & arch_info_struct[3]),
|
||||
N (bfd_mach_ck802, "csky:ck802", FALSE, & arch_info_struct[4]),
|
||||
N (bfd_mach_ck803, "csky:ck803", FALSE, & arch_info_struct[5]),
|
||||
N (bfd_mach_ck807, "csky:ck807", FALSE, & arch_info_struct[6]),
|
||||
N (bfd_mach_ck810, "csky:ck810", FALSE, & arch_info_struct[7]),
|
||||
N (bfd_mach_ck_unknown, "csky:any", FALSE, NULL)
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_csky_arch =
|
||||
N (0, "csky", TRUE, & arch_info_struct[0]);
|
68
external/gpl3/binutils/dist/bfd/cpu-d10v.c
vendored
68
external/gpl3/binutils/dist/bfd/cpu-d10v.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the D10V processor
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
Contributed by Martin Hunt (hunt@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -23,53 +23,29 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
16, /* Bits in a word. */ \
|
||||
18, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_d10v, \
|
||||
NUMBER, \
|
||||
"d10v", \
|
||||
PRINT, \
|
||||
4, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type d10v_ts3_info =
|
||||
{
|
||||
16, /* 16 bits in a word. */
|
||||
18, /* really 16 bits in an address, but code has 18 bit range. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_d10v,
|
||||
bfd_mach_d10v_ts3,
|
||||
"d10v",
|
||||
"d10v:ts3",
|
||||
4, /* Section alignment power. */
|
||||
FALSE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
N (bfd_mach_d10v_ts3, "d10v:ts3", FALSE, NULL);
|
||||
|
||||
static const bfd_arch_info_type d10v_ts2_info =
|
||||
{
|
||||
16,
|
||||
18,
|
||||
8,
|
||||
bfd_arch_d10v,
|
||||
bfd_mach_d10v_ts2,
|
||||
"d10v",
|
||||
"d10v:ts2",
|
||||
4,
|
||||
FALSE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
& d10v_ts3_info,
|
||||
};
|
||||
N (bfd_mach_d10v_ts2, "d10v:ts2", FALSE, & d10v_ts3_info);
|
||||
|
||||
const bfd_arch_info_type bfd_d10v_arch =
|
||||
{
|
||||
16,
|
||||
18,
|
||||
8,
|
||||
bfd_arch_d10v,
|
||||
bfd_mach_d10v,
|
||||
"d10v",
|
||||
"d10v",
|
||||
4,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
& d10v_ts2_info,
|
||||
};
|
||||
N (bfd_mach_d10v, "d10v", TRUE, & d10v_ts2_info);
|
||||
|
29
external/gpl3/binutils/dist/bfd/cpu-d30v.c
vendored
29
external/gpl3/binutils/dist/bfd/cpu-d30v.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Mitsubishi D30V processor
|
||||
Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
Contributed by Martin Hunt (hunt@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -25,17 +25,18 @@
|
||||
|
||||
const bfd_arch_info_type bfd_d30v_arch =
|
||||
{
|
||||
32, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_d30v,
|
||||
0,
|
||||
"d30v",
|
||||
"d30v",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
32, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_d30v,
|
||||
0,
|
||||
"d30v",
|
||||
"d30v",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
31
external/gpl3/binutils/dist/bfd/cpu-dlx.c
vendored
31
external/gpl3/binutils/dist/bfd/cpu-dlx.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the DLX Microprocessor architecture.
|
||||
Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
Hacked by Kuang Hwa Lin <kuang@sbcglobal.net>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -24,18 +24,19 @@
|
||||
#include "libbfd.h"
|
||||
|
||||
const bfd_arch_info_type bfd_dlx_arch =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_dlx,
|
||||
0, /* Only 1 machine. */
|
||||
"dlx",
|
||||
"dlx",
|
||||
4,
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
{
|
||||
32, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_dlx,
|
||||
0, /* Machine number. */
|
||||
"dlx",
|
||||
"dlx",
|
||||
4,
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
53
external/gpl3/binutils/dist/bfd/cpu-epiphany.c
vendored
53
external/gpl3/binutils/dist/bfd/cpu-epiphany.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Adapteva EPIPHANY processor.
|
||||
Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
Contributed by Embecosm on behalf of Adapteva, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -23,36 +23,27 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, ALIGN, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_epiphany, \
|
||||
NUMBER, \
|
||||
"epiphany", \
|
||||
PRINT, \
|
||||
ALIGN, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
const bfd_arch_info_type bfd_epiphany16_arch =
|
||||
{
|
||||
32, /* Bits per word */
|
||||
32, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_epiphany, /* Architecture. */
|
||||
bfd_mach_epiphany16, /* Machine. */
|
||||
"epiphany", /* Architecture name. */
|
||||
"epiphany16", /* Machine name. */
|
||||
1, /* Section align power. */
|
||||
FALSE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL /* Next in list. */
|
||||
};
|
||||
N (bfd_mach_epiphany16, "epiphany16", 1, FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_epiphany_arch =
|
||||
{
|
||||
32, /* Bits per word - not really true. */
|
||||
32, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_epiphany, /* Architecture. */
|
||||
bfd_mach_epiphany32, /* Machine. */
|
||||
"epiphany", /* Architecture name. */
|
||||
"epiphany32", /* Machine name. */
|
||||
2, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
& bfd_epiphany16_arch /* Next in list. */
|
||||
};
|
||||
N (bfd_mach_epiphany32, "epiphany32", 2, TRUE, & bfd_epiphany16_arch);
|
||||
|
||||
|
27
external/gpl3/binutils/dist/bfd/cpu-fr30.c
vendored
27
external/gpl3/binutils/dist/bfd/cpu-fr30.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the FR30 processor.
|
||||
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,17 +24,18 @@
|
||||
|
||||
const bfd_arch_info_type bfd_fr30_arch =
|
||||
{
|
||||
32, /* bits per word */
|
||||
32, /* bits per address */
|
||||
8, /* bits per byte */
|
||||
bfd_arch_fr30, /* architecture */
|
||||
bfd_mach_fr30, /* machine */
|
||||
"fr30", /* architecture name */
|
||||
"fr30", /* printable name */
|
||||
4, /* section align power */
|
||||
TRUE, /* the default ? */
|
||||
bfd_default_compatible, /* architecture comparison fn */
|
||||
bfd_default_scan, /* string to architecture convert fn */
|
||||
32, /* Bits per word. */
|
||||
32, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_fr30, /* Architecture. */
|
||||
bfd_mach_fr30, /* Machine. */
|
||||
"fr30", /* Architecture name. */
|
||||
"fr30", /* Printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL /* next in list */
|
||||
NULL, /* Next in list. */
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
27
external/gpl3/binutils/dist/bfd/cpu-frv.c
vendored
27
external/gpl3/binutils/dist/bfd/cpu-frv.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the FRV processor.
|
||||
Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,19 +24,20 @@
|
||||
|
||||
#define FRV_ARCH(MACHINE, NAME, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* 32 bits in a word */ \
|
||||
32, /* 32 bits in an address */ \
|
||||
8, /* 8 bits in a byte */ \
|
||||
bfd_arch_frv, /* architecture */ \
|
||||
MACHINE, /* which machine */ \
|
||||
"frv", /* architecture name */ \
|
||||
NAME, /* machine name */ \
|
||||
4, /* default alignment */ \
|
||||
DEFAULT, /* is this the default? */ \
|
||||
bfd_default_compatible, /* architecture comparison fn */ \
|
||||
bfd_default_scan, /* string to architecture convert fn */ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_frv, /* Architecture number. */ \
|
||||
MACHINE, /* Machine number. */ \
|
||||
"frv", /* Architecture name. */ \
|
||||
NAME, /* Machine name. */ \
|
||||
4, /* Section alignment. */ \
|
||||
DEFAULT, /* Is this the default? */ \
|
||||
bfd_default_compatible, /* Architecture comparison fn. */ \
|
||||
bfd_default_scan, /* String to architecture convert fn. */\
|
||||
bfd_arch_default_fill, /* Default fill. */ \
|
||||
NEXT /* next in list */ \
|
||||
NEXT, /* Next in list. */ \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type arch_info_300
|
||||
|
73
external/gpl3/binutils/dist/bfd/cpu-ft32.c
vendored
73
external/gpl3/binutils/dist/bfd/cpu-ft32.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the ft32 processor.
|
||||
Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
Written by FTDI (support@ftdichip.com)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -22,54 +22,31 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_ft32, \
|
||||
NUMBER, \
|
||||
"ft32", \
|
||||
PRINT, \
|
||||
2, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_ft32, /* enum bfd_architecture arch. */
|
||||
bfd_mach_ft32,
|
||||
"ft32", /* Arch name. */
|
||||
"ft32", /* Printable name. */
|
||||
2, /* Unsigned int section alignment power. */
|
||||
FALSE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&arch_info_struct[1],
|
||||
},
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_ft32, /* enum bfd_architecture arch. */
|
||||
bfd_mach_ft32b,
|
||||
"ft32b", /* Arch name. */
|
||||
"ft32b", /* Printable name. */
|
||||
2, /* Unsigned int section alignment power. */
|
||||
FALSE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
},
|
||||
};
|
||||
{
|
||||
N (bfd_mach_ft32, "ft32", FALSE, &arch_info_struct[1]),
|
||||
N (bfd_mach_ft32b, "ft32b", FALSE, NULL)
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_ft32_arch =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_ft32, /* enum bfd_architecture arch. */
|
||||
bfd_mach_ft32,
|
||||
"ft32", /* Arch name. */
|
||||
"ft32", /* Printable name. */
|
||||
2, /* Unsigned int section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
arch_info_struct,
|
||||
};
|
||||
N (bfd_mach_ft32, "ft32", TRUE, arch_info_struct);
|
||||
|
||||
|
119
external/gpl3/binutils/dist/bfd/cpu-h8300.c
vendored
119
external/gpl3/binutils/dist/bfd/cpu-h8300.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD library support routines for the Renesas H8/300 architecture.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Hacked by Steve Chamberlain of Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -22,6 +22,7 @@
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "cpu-h8300.h"
|
||||
|
||||
static bfd_boolean
|
||||
h8300_scan (const struct bfd_arch_info *info, const char *string)
|
||||
@ -113,124 +114,30 @@ compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
|
||||
return in;
|
||||
}
|
||||
|
||||
#define N(word, addr, number, name, print, default, next) \
|
||||
{ word, addr, 8, bfd_arch_h8300, number, name, print, 1, default, \
|
||||
compatible, h8300_scan, bfd_arch_default_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type h8300sxn_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
16, /* 16 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300sxn,
|
||||
"h8300sxn", /* arch_name */
|
||||
"h8300sxn", /* printable name */
|
||||
1,
|
||||
FALSE, /* the default machine */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
0
|
||||
};
|
||||
N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", FALSE, NULL);
|
||||
|
||||
static const bfd_arch_info_type h8300sx_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300sx,
|
||||
"h8300sx", /* arch_name */
|
||||
"h8300sx", /* printable name */
|
||||
1,
|
||||
FALSE, /* the default machine */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
&h8300sxn_info_struct
|
||||
};
|
||||
N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", FALSE, &h8300sxn_info_struct);
|
||||
|
||||
static const bfd_arch_info_type h8300sn_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
16, /* 16 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300sn,
|
||||
"h8300sn", /* Architecture name. */
|
||||
"h8300sn", /* Printable name. */
|
||||
1,
|
||||
FALSE, /* The default machine. */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
&h8300sx_info_struct
|
||||
};
|
||||
N (32, 16, bfd_mach_h8300sn, "h8300sn", "h8300sn", FALSE, &h8300sx_info_struct);
|
||||
|
||||
static const bfd_arch_info_type h8300hn_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
16, /* 16 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300hn,
|
||||
"h8300hn", /* Architecture name. */
|
||||
"h8300hn", /* Printable name. */
|
||||
1,
|
||||
FALSE, /* The default machine. */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
&h8300sn_info_struct
|
||||
};
|
||||
N (32, 16, bfd_mach_h8300hn, "h8300hn", "h8300hn", FALSE, &h8300sn_info_struct);
|
||||
|
||||
static const bfd_arch_info_type h8300s_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300s,
|
||||
"h8300s", /* Architecture name. */
|
||||
"h8300s", /* Printable name. */
|
||||
1,
|
||||
FALSE, /* The default machine. */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
& h8300hn_info_struct
|
||||
};
|
||||
N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", FALSE, & h8300hn_info_struct);
|
||||
|
||||
static const bfd_arch_info_type h8300h_info_struct =
|
||||
{
|
||||
32, /* 32 bits in a word. */
|
||||
32, /* 32 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300h,
|
||||
"h8300h", /* Architecture name. */
|
||||
"h8300h", /* Printable name. */
|
||||
1,
|
||||
FALSE, /* The default machine. */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
&h8300s_info_struct
|
||||
};
|
||||
N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", FALSE, &h8300s_info_struct);
|
||||
|
||||
const bfd_arch_info_type bfd_h8300_arch =
|
||||
{
|
||||
16, /* 16 bits in a word. */
|
||||
16, /* 16 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_h8300,
|
||||
bfd_mach_h8300,
|
||||
"h8300", /* Architecture name. */
|
||||
"h8300", /* Printable name. */
|
||||
1,
|
||||
TRUE, /* The default machine. */
|
||||
compatible,
|
||||
h8300_scan,
|
||||
bfd_arch_default_fill,
|
||||
&h8300h_info_struct
|
||||
};
|
||||
N (16, 16, bfd_mach_h8300, "h8300", "h8300", TRUE, &h8300h_info_struct);
|
||||
|
||||
/* Pad the given address to 32 bits, converting 16-bit and 24-bit
|
||||
addresses into the values they would have had on a h8s target. */
|
||||
|
22
external/gpl3/binutils/dist/bfd/cpu-h8300.h
vendored
Normal file
22
external/gpl3/binutils/dist/bfd/cpu-h8300.h
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/* H8/300 functions.
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
extern bfd_vma bfd_h8300_pad_address
|
||||
(bfd *, bfd_vma);
|
89
external/gpl3/binutils/dist/bfd/cpu-hppa.c
vendored
89
external/gpl3/binutils/dist/bfd/cpu-hppa.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the HP Precision Architecture architecture.
|
||||
Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -22,72 +22,35 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
BITS, /* Bits in a word. */ \
|
||||
BITS, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_hppa, \
|
||||
NUMBER, \
|
||||
"hppa", \
|
||||
PRINT, \
|
||||
3, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
|
||||
static const bfd_arch_info_type bfd_hppa10_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_hppa,
|
||||
bfd_mach_hppa10, /* By convention PA1.0 = 10 */
|
||||
"hppa",
|
||||
"hppa1.0",
|
||||
3,
|
||||
TRUE, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
N (32, bfd_mach_hppa10, "hppa1.0", TRUE, NULL);
|
||||
|
||||
/* PA2.0 in narrow mode */
|
||||
/* PA2.0 in narrow mode. */
|
||||
static const bfd_arch_info_type bfd_hppa20_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_hppa,
|
||||
bfd_mach_hppa20, /* By convention PA2.0 = 20 */
|
||||
"hppa",
|
||||
"hppa2.0",
|
||||
3,
|
||||
FALSE, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_hppa10_arch,
|
||||
};
|
||||
N (32, bfd_mach_hppa20, "hppa2.0", FALSE, &bfd_hppa10_arch);
|
||||
|
||||
/* PA2.0 in wide mode */
|
||||
/* PA2.0 in wide mode. */
|
||||
static const bfd_arch_info_type bfd_hppa20w_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_hppa,
|
||||
bfd_mach_hppa20w, /* ??? How best to describe wide mode here? */
|
||||
"hppa",
|
||||
"hppa2.0w",
|
||||
3,
|
||||
FALSE, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_hppa20_arch,
|
||||
};
|
||||
N (64, bfd_mach_hppa20w, "hppa2.0w", FALSE, &bfd_hppa20_arch);
|
||||
|
||||
const bfd_arch_info_type bfd_hppa_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_hppa,
|
||||
bfd_mach_hppa11, /* By convention PA1.1 = 11 */
|
||||
"hppa",
|
||||
"hppa1.1",
|
||||
3,
|
||||
FALSE, /* 1.1 specific features used */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_hppa20w_arch,
|
||||
};
|
||||
N (32, bfd_mach_hppa11, "hppa1.1", FALSE, &bfd_hppa20w_arch);
|
||||
|
191
external/gpl3/binutils/dist/bfd/cpu-i386.c
vendored
191
external/gpl3/binutils/dist/bfd/cpu-i386.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Intel 386 architecture.
|
||||
Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -130,173 +130,62 @@ bfd_arch_i386_onebyte_nop_fill (bfd_size_type count,
|
||||
return fill;
|
||||
}
|
||||
|
||||
#define N(BITS, MACH, NAME, PRINT, DEF, FILL, NEXT) \
|
||||
{ BITS, /* Bits in a word. */ \
|
||||
BITS, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_i386, \
|
||||
MACH, /* Machine number. */ \
|
||||
NAME, \
|
||||
PRINT, \
|
||||
3, /* Section alignment power. */ \
|
||||
DEF, /* Default architecture version ? */ \
|
||||
bfd_i386_compatible, \
|
||||
bfd_default_scan, \
|
||||
FILL, \
|
||||
NEXT, \
|
||||
0 /* Maximum instruction length. */ \
|
||||
}
|
||||
|
||||
|
||||
static const bfd_arch_info_type bfd_x64_32_nacl_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x64_32_nacl,
|
||||
"i386",
|
||||
"i386:x64-32:nacl",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_onebyte_nop_fill,
|
||||
NULL
|
||||
};
|
||||
N (64, bfd_mach_x64_32_nacl, "i386", "i386:x64-32:nacl",
|
||||
FALSE, bfd_arch_i386_onebyte_nop_fill, NULL);
|
||||
|
||||
static const bfd_arch_info_type bfd_x86_64_nacl_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x86_64_nacl,
|
||||
"i386",
|
||||
"i386:x86-64:nacl",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_onebyte_nop_fill,
|
||||
&bfd_x64_32_nacl_arch
|
||||
};
|
||||
N (64, bfd_mach_x86_64_nacl, "i386", "i386:x86-64:nacl",
|
||||
FALSE, bfd_arch_i386_onebyte_nop_fill, &bfd_x64_32_nacl_arch);
|
||||
|
||||
const bfd_arch_info_type bfd_i386_nacl_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_i386_i386_nacl,
|
||||
"i386",
|
||||
"i386:nacl",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_onebyte_nop_fill,
|
||||
&bfd_x86_64_nacl_arch
|
||||
};
|
||||
N (32, bfd_mach_i386_i386_nacl, "i386", "i386:nacl",
|
||||
TRUE, bfd_arch_i386_onebyte_nop_fill, &bfd_x86_64_nacl_arch);
|
||||
|
||||
|
||||
static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x64_32_intel_syntax,
|
||||
"i386:intel",
|
||||
"i386:x64-32:intel",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_long_nop_fill,
|
||||
&bfd_i386_nacl_arch
|
||||
};
|
||||
N (64, bfd_mach_x64_32_intel_syntax, "i386:intel", "i386:x64-32:intel",
|
||||
FALSE, bfd_arch_i386_long_nop_fill, &bfd_i386_nacl_arch);
|
||||
|
||||
static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x86_64_intel_syntax,
|
||||
"i386:intel",
|
||||
"i386:x86-64:intel",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_long_nop_fill,
|
||||
&bfd_x64_32_arch_intel_syntax,
|
||||
};
|
||||
N (64, bfd_mach_x86_64_intel_syntax, "i386:intel", "i386:x86-64:intel",
|
||||
FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch_intel_syntax);
|
||||
|
||||
static const bfd_arch_info_type bfd_i386_arch_intel_syntax =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_i386_i386_intel_syntax,
|
||||
"i386:intel",
|
||||
"i386:intel",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_x86_64_arch_intel_syntax
|
||||
};
|
||||
N (32, bfd_mach_i386_i386_intel_syntax, "i386:intel", "i386:intel",
|
||||
TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch_intel_syntax);
|
||||
|
||||
|
||||
static const bfd_arch_info_type i8086_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address (well, not really) */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_i386_i8086,
|
||||
"i8086",
|
||||
"i8086",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_i386_arch_intel_syntax
|
||||
};
|
||||
N (32, bfd_mach_i386_i8086, "i8086", "i8086",
|
||||
FALSE, bfd_arch_i386_short_nop_fill, &bfd_i386_arch_intel_syntax);
|
||||
|
||||
static const bfd_arch_info_type bfd_x64_32_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x64_32,
|
||||
"i386",
|
||||
"i386:x64-32",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_long_nop_fill,
|
||||
&i8086_arch
|
||||
};
|
||||
N (64, bfd_mach_x64_32, "i386", "i386:x64-32",
|
||||
FALSE, bfd_arch_i386_long_nop_fill, &i8086_arch);
|
||||
|
||||
static const bfd_arch_info_type bfd_x86_64_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_x86_64,
|
||||
"i386",
|
||||
"i386:x86-64",
|
||||
3,
|
||||
FALSE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_long_nop_fill,
|
||||
&bfd_x64_32_arch
|
||||
};
|
||||
N (64, bfd_mach_x86_64, "i386", "i386:x86-64",
|
||||
FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch);
|
||||
|
||||
const bfd_arch_info_type bfd_i386_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_i386,
|
||||
bfd_mach_i386_i386,
|
||||
"i386",
|
||||
"i386",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_i386_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_x86_64_arch
|
||||
};
|
||||
N (32, bfd_mach_i386_i386, "i386", "i386",
|
||||
TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -186,7 +186,7 @@ ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,
|
||||
ia64_insn *valuep, int scale)
|
||||
{
|
||||
int i, bits = 0, total = 0;
|
||||
BFD_HOST_64_BIT val = 0, sign;
|
||||
BFD_HOST_U_64_BIT val = 0, sign;
|
||||
|
||||
for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i)
|
||||
{
|
||||
@ -196,10 +196,10 @@ ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,
|
||||
total += bits;
|
||||
}
|
||||
/* sign extend: */
|
||||
sign = (BFD_HOST_64_BIT) 1 << (total - 1);
|
||||
sign = (BFD_HOST_U_64_BIT) 1 << (total - 1);
|
||||
val = (val ^ sign) - sign;
|
||||
|
||||
*valuep = (val << scale);
|
||||
*valuep = val << scale;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
52
external/gpl3/binutils/dist/bfd/cpu-ia64.c
vendored
52
external/gpl3/binutils/dist/bfd/cpu-ia64.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the ia64 architecture.
|
||||
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -23,38 +23,28 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
64, /* Bits in a word. */ \
|
||||
BITS_ADDR, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_ia64, \
|
||||
NUMBER, \
|
||||
"ia64", \
|
||||
PRINT, \
|
||||
3, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
const bfd_arch_info_type bfd_ia64_elf32_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_ia64,
|
||||
bfd_mach_ia64_elf32,
|
||||
"ia64",
|
||||
"ia64-elf32",
|
||||
3, /* log2 of section alignment */
|
||||
TRUE, /* the one and only */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
N (32, bfd_mach_ia64_elf32, "ia64-elf32", FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_ia64_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_ia64,
|
||||
bfd_mach_ia64_elf64,
|
||||
"ia64",
|
||||
"ia64-elf64",
|
||||
3, /* log2 of section alignment */
|
||||
TRUE, /* the one and only */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_ia64_elf32_arch,
|
||||
};
|
||||
N (64, bfd_mach_ia64_elf64, "ia64-elf64", TRUE, &bfd_ia64_elf32_arch);
|
||||
|
||||
#include "cpu-ia64-opc.c"
|
||||
|
40
external/gpl3/binutils/dist/bfd/cpu-iamcu.c
vendored
40
external/gpl3/binutils/dist/bfd/cpu-iamcu.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Intel MCU architecture.
|
||||
Copyright (C) 2015-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2015-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -25,36 +25,14 @@
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
|
||||
#define N(number, name, print, next) \
|
||||
{ 32, 32, 8, bfd_arch_iamcu, number, name, print, 3, TRUE, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
bfd_arch_i386_short_nop_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type bfd_iamcu_arch_intel_syntax =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_iamcu,
|
||||
bfd_mach_i386_iamcu_intel_syntax,
|
||||
"iamcu:intel",
|
||||
"iamcu:intel",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
0
|
||||
};
|
||||
N (bfd_mach_i386_iamcu_intel_syntax, "iamcu:intel", "iamcu:intel", NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_iamcu_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_iamcu,
|
||||
bfd_mach_i386_iamcu,
|
||||
"iamcu",
|
||||
"iamcu",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_iamcu_arch_intel_syntax
|
||||
};
|
||||
N (bfd_mach_i386_iamcu, "iamcu", "iamcu", &bfd_iamcu_arch_intel_syntax);
|
||||
|
||||
|
53
external/gpl3/binutils/dist/bfd/cpu-ip2k.c
vendored
53
external/gpl3/binutils/dist/bfd/cpu-ip2k.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Scenix IP2xxx processor.
|
||||
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -22,36 +22,27 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
16, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_ip2k, \
|
||||
NUMBER, \
|
||||
"ip2k", \
|
||||
PRINT, \
|
||||
1, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
const bfd_arch_info_type bfd_ip2k_nonext_arch =
|
||||
{
|
||||
32, /* Bits per word - not really true. */
|
||||
16, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_ip2k, /* Architecture. */
|
||||
bfd_mach_ip2022, /* Machine. */
|
||||
"ip2k", /* Architecture name. */
|
||||
"ip2022", /* Machine name. */
|
||||
1, /* Section align power. */
|
||||
FALSE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL /* Next in list. */
|
||||
};
|
||||
N (bfd_mach_ip2022, "ip2022", FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_ip2k_arch =
|
||||
{
|
||||
32, /* Bits per word - not really true. */
|
||||
16, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_ip2k, /* Architecture. */
|
||||
bfd_mach_ip2022ext, /* Machine. */
|
||||
"ip2k", /* Architecture name. */
|
||||
"ip2022ext", /* Machine name. */
|
||||
1, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
& bfd_ip2k_nonext_arch /* Next in list. */
|
||||
};
|
||||
N (bfd_mach_ip2022ext, "ip2022ext", TRUE, & bfd_ip2k_nonext_arch);
|
||||
|
||||
|
55
external/gpl3/binutils/dist/bfd/cpu-iq2000.c
vendored
55
external/gpl3/binutils/dist/bfd/cpu-iq2000.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Vitesse IQ2000 processor.
|
||||
Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -22,38 +22,27 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
{
|
||||
32, /* bits per word */
|
||||
32, /* bits per address */
|
||||
8, /* bits per byte */
|
||||
bfd_arch_iq2000, /* architecture */
|
||||
bfd_mach_iq10, /* machine */
|
||||
"iq2000", /* architecture name */
|
||||
"iq10", /* printable name */
|
||||
3, /* section align power */
|
||||
FALSE, /* the default ? */
|
||||
bfd_default_compatible, /* architecture comparison fn */
|
||||
bfd_default_scan, /* string to architecture convert fn */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL /* next in list */
|
||||
#define N(NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_iq2000, \
|
||||
NUMBER, \
|
||||
"iq2000", \
|
||||
PRINT, \
|
||||
3, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
};
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct =
|
||||
N (bfd_mach_iq10, "iq10", FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_iq2000_arch =
|
||||
{
|
||||
32, /* bits per word */
|
||||
32, /* bits per address */
|
||||
8, /* bits per byte */
|
||||
bfd_arch_iq2000, /* architecture */
|
||||
bfd_mach_iq2000, /* machine */
|
||||
"iq2000", /* architecture name */
|
||||
"iq2000", /* printable name */
|
||||
3, /* section align power */
|
||||
TRUE, /* the default ? */
|
||||
bfd_default_compatible, /* architecture comparison fn */
|
||||
bfd_default_scan, /* string to architecture convert fn */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
&arch_info_struct[0], /* next in list */
|
||||
};
|
||||
N (bfd_mach_iq2000, "iq2000", TRUE, &arch_info_struct);
|
||||
|
||||
|
40
external/gpl3/binutils/dist/bfd/cpu-k1om.c
vendored
40
external/gpl3/binutils/dist/bfd/cpu-k1om.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Intel K1OM architecture.
|
||||
Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -25,36 +25,14 @@
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_k1om, number, name, print, 3, TRUE, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
bfd_arch_i386_short_nop_fill, next, 9 }
|
||||
|
||||
static const bfd_arch_info_type bfd_k1om_arch_intel_syntax =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_k1om,
|
||||
bfd_mach_k1om_intel_syntax,
|
||||
"k1om:intel",
|
||||
"k1om:intel",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
0
|
||||
};
|
||||
N (bfd_mach_k1om_intel_syntax, "k1om:intel", "k1om:intel", NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_k1om_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_k1om,
|
||||
bfd_mach_k1om,
|
||||
"k1om",
|
||||
"k1om",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_k1om_arch_intel_syntax
|
||||
};
|
||||
N (bfd_mach_k1om, "k1om", "k1om", &bfd_k1om_arch_intel_syntax);
|
||||
|
||||
|
39
external/gpl3/binutils/dist/bfd/cpu-l1om.c
vendored
39
external/gpl3/binutils/dist/bfd/cpu-l1om.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Intel L1OM architecture.
|
||||
Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -25,36 +25,13 @@
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_l1om, number, name, print, 3, TRUE, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
bfd_arch_i386_short_nop_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type bfd_l1om_arch_intel_syntax =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_l1om,
|
||||
bfd_mach_l1om_intel_syntax,
|
||||
"l1om:intel",
|
||||
"l1om:intel",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
0
|
||||
};
|
||||
N (bfd_mach_l1om_intel_syntax, "l1om:intel", "l1om:intel", NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_l1om_arch =
|
||||
{
|
||||
64, /* 64 bits in a word */
|
||||
64, /* 64 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_l1om,
|
||||
bfd_mach_l1om,
|
||||
"l1om",
|
||||
"l1om",
|
||||
3,
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_i386_short_nop_fill,
|
||||
&bfd_l1om_arch_intel_syntax
|
||||
};
|
||||
N (bfd_mach_l1om, "l1om", "l1om", &bfd_l1om_arch_intel_syntax);
|
||||
|
29
external/gpl3/binutils/dist/bfd/cpu-lm32.c
vendored
29
external/gpl3/binutils/dist/bfd/cpu-lm32.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Lattice Mico32 architecture.
|
||||
Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
Contributed by Jon Beniston <jon@beniston.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -25,17 +25,18 @@
|
||||
|
||||
const bfd_arch_info_type bfd_lm32_arch =
|
||||
{
|
||||
32, /* Bits in word. */
|
||||
32, /* Bits in address. */
|
||||
8, /* Bits in byte. */
|
||||
bfd_arch_lm32, /* Enum bfd_architecture. */
|
||||
bfd_mach_lm32, /* Machine number. */
|
||||
"lm32", /* Architecture name. */
|
||||
"lm32", /* Printable name. */
|
||||
4, /* Alignment. */
|
||||
TRUE, /* Is this the default machine for the target. */
|
||||
bfd_default_compatible, /* Function callback to test if two files have compatible machines. */
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL /* Next. */
|
||||
32, /* Bits in word. */
|
||||
32, /* Bits in address. */
|
||||
8, /* Bits in byte. */
|
||||
bfd_arch_lm32, /* Enum bfd_architecture. */
|
||||
bfd_mach_lm32, /* Machine number. */
|
||||
"lm32", /* Architecture name. */
|
||||
"lm32", /* Printable name. */
|
||||
4, /* Alignment. */
|
||||
TRUE, /* Is this the default machine for the target. */
|
||||
bfd_default_compatible, /* Function callback to test if two files have compatible machines. */
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL, /* Next. */
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
33
external/gpl3/binutils/dist/bfd/cpu-m10200.c
vendored
33
external/gpl3/binutils/dist/bfd/cpu-m10200.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Matsushita 10200 processor
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -23,18 +23,19 @@
|
||||
#include "libbfd.h"
|
||||
|
||||
const bfd_arch_info_type bfd_mn10200_arch =
|
||||
{
|
||||
16, /* 16 bits in a word */
|
||||
24, /* 16 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_mn10200,
|
||||
200,
|
||||
"mn10200",
|
||||
"mn10200",
|
||||
2,
|
||||
TRUE, /* the one and only */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
{
|
||||
16, /* Bits in a word. */
|
||||
24, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_mn10200,
|
||||
200,
|
||||
"mn10200",
|
||||
"mn10200",
|
||||
2,
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
68
external/gpl3/binutils/dist/bfd/cpu-m10300.c
vendored
68
external/gpl3/binutils/dist/bfd/cpu-m10300.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Matsushita 10300 processor
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -22,53 +22,29 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, NAME, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
32, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_mn10300, \
|
||||
NUMBER, \
|
||||
NAME, \
|
||||
PRINT, \
|
||||
2, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
const bfd_arch_info_type bfd_am33_2_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_mn10300,
|
||||
332,
|
||||
"am33_2",
|
||||
"am33-2",
|
||||
2,
|
||||
FALSE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
N (bfd_mach_am33_2, "am33_2", "am33-2", FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_am33_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_mn10300,
|
||||
330,
|
||||
"am33",
|
||||
"am33",
|
||||
2,
|
||||
FALSE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_am33_2_arch,
|
||||
};
|
||||
N (bfd_mach_am33, "am33", "am33", FALSE, &bfd_am33_2_arch);
|
||||
|
||||
const bfd_arch_info_type bfd_mn10300_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_mn10300,
|
||||
300,
|
||||
"mn10300",
|
||||
"mn10300",
|
||||
2,
|
||||
TRUE, /* the one and only */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_am33_arch,
|
||||
};
|
||||
N (bfd_mach_mn10300, "mn10300", "mn10300", TRUE, &bfd_am33_arch);
|
||||
|
43
external/gpl3/binutils/dist/bfd/cpu-m32c.c
vendored
43
external/gpl3/binutils/dist/bfd/cpu-m32c.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the M16C/M32C processors.
|
||||
Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -35,38 +35,13 @@ m32c_scan (const bfd_arch_info_type * info, const char * string)
|
||||
return bfd_default_scan (info, string);
|
||||
}
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
{
|
||||
32, /* bits per word */
|
||||
32, /* bits per address */
|
||||
8, /* bits per byte */
|
||||
bfd_arch_m32c, /* architecture */
|
||||
bfd_mach_m32c, /* machine */
|
||||
"m32c", /* architecture name */
|
||||
"m32c", /* printable name */
|
||||
3, /* section align power */
|
||||
FALSE, /* the default ? */
|
||||
bfd_default_compatible, /* architecture comparison fn */
|
||||
m32c_scan, /* string to architecture convert fn */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
NULL /* next in list */
|
||||
},
|
||||
};
|
||||
#define N(number, print, align, default, next) \
|
||||
{ 32, 32, 8, bfd_arch_m32c, number, "m32c", print, align, default, \
|
||||
bfd_default_compatible, m32c_scan, bfd_arch_default_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct =
|
||||
N (bfd_mach_m32c, "m32c", 3, FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_m32c_arch =
|
||||
{
|
||||
32, /* Bits per word. */
|
||||
32, /* Bits per address. */
|
||||
8, /* Bits per byte. */
|
||||
bfd_arch_m32c, /* Architecture. */
|
||||
bfd_mach_m16c, /* Machine. */
|
||||
"m32c", /* Architecture name. */
|
||||
"m16c", /* Printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
m32c_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
&arch_info_struct[0], /* Next in list. */
|
||||
};
|
||||
N (bfd_mach_m16c, "m16c", 4, TRUE, &arch_info_struct);
|
||||
|
||||
|
6
external/gpl3/binutils/dist/bfd/cpu-m32r.c
vendored
6
external/gpl3/binutils/dist/bfd/cpu-m32r.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the M32R processor.
|
||||
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(number, print, default, next) \
|
||||
{ 32, 32, 8, bfd_arch_m32r, number, "m32r", print, 4, default, \
|
||||
bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
|
||||
{ 32, 32, 8, bfd_arch_m32r, number, "m32r", print, 4, default, \
|
||||
bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next, 0 }
|
||||
|
||||
#define M32R2_NEXT & arch_info_struct [1]
|
||||
#define NEXT & arch_info_struct [0]
|
||||
|
29
external/gpl3/binutils/dist/bfd/cpu-m68hc11.c
vendored
29
external/gpl3/binutils/dist/bfd/cpu-m68hc11.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Motorola 68HC11 processor
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,17 +24,18 @@
|
||||
|
||||
const bfd_arch_info_type bfd_m68hc11_arch =
|
||||
{
|
||||
16, /* 16 bits in a word */
|
||||
16, /* 16 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_m68hc11,
|
||||
0,
|
||||
"m68hc11",
|
||||
"m68hc11",
|
||||
4, /* section alignment power */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
16, /* Bits in a word. */
|
||||
16, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_m68hc11,
|
||||
0,
|
||||
"m68hc11",
|
||||
"m68hc11",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
53
external/gpl3/binutils/dist/bfd/cpu-m68hc12.c
vendored
53
external/gpl3/binutils/dist/bfd/cpu-m68hc12.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Motorola 68HC12 processor
|
||||
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -22,36 +22,27 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define N(NUMBER, PRINT, DEFAULT, NEXT) \
|
||||
{ \
|
||||
16, /* Bits in a word. */ \
|
||||
32, /* Bits in an address. */ \
|
||||
8, /* Bits in a byte. */ \
|
||||
bfd_arch_m68hc12, \
|
||||
NUMBER, \
|
||||
"m68hc12", \
|
||||
PRINT, \
|
||||
4, /* Section alignment power. */ \
|
||||
DEFAULT, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
bfd_arch_default_fill, \
|
||||
NEXT, \
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */ \
|
||||
}
|
||||
|
||||
const bfd_arch_info_type bfd_m68hc12s_arch =
|
||||
{
|
||||
16, /* 16 bits in a word */
|
||||
32, /* 16 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_m68hc12,
|
||||
bfd_mach_m6812s,
|
||||
"m68hc12:HCS12",
|
||||
"m68hc12",
|
||||
4, /* section alignment power */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
};
|
||||
N (bfd_mach_m6812s, "m68hc12:HCS12", FALSE, NULL);
|
||||
|
||||
const bfd_arch_info_type bfd_m68hc12_arch =
|
||||
{
|
||||
16, /* 16 bits in a word */
|
||||
32, /* 16 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_m68hc12,
|
||||
0,
|
||||
"m68hc12",
|
||||
"m68hc12",
|
||||
4, /* section alignment power */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
&bfd_m68hc12s_arch,
|
||||
};
|
||||
N (bfd_mach_m6812_default, "m68hc12", TRUE, &bfd_m68hc12s_arch);
|
||||
|
||||
|
5
external/gpl3/binutils/dist/bfd/cpu-m68k.c
vendored
5
external/gpl3/binutils/dist/bfd/cpu-m68k.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD library support routines for architectures.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 Free Software Foundation, Inc.
|
||||
Hacked by Steve Chamberlain of Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -23,6 +23,7 @@
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "opcode/m68k.h"
|
||||
#include "cpu-m68k.h"
|
||||
|
||||
static const bfd_arch_info_type *
|
||||
bfd_m68k_compatible (const bfd_arch_info_type *a,
|
||||
@ -30,7 +31,7 @@ bfd_m68k_compatible (const bfd_arch_info_type *a,
|
||||
|
||||
#define N(name, print,d,next) \
|
||||
{ 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_m68k_compatible, \
|
||||
bfd_default_scan, bfd_arch_default_fill, next, }
|
||||
bfd_default_scan, bfd_arch_default_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
|
23
external/gpl3/binutils/dist/bfd/cpu-m68k.h
vendored
Normal file
23
external/gpl3/binutils/dist/bfd/cpu-m68k.h
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/* BFD library support routines.
|
||||
Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
extern unsigned bfd_m68k_mach_to_features (int);
|
||||
|
||||
extern int bfd_m68k_features_to_mach (unsigned);
|
29
external/gpl3/binutils/dist/bfd/cpu-m9s12x.c
vendored
29
external/gpl3/binutils/dist/bfd/cpu-m9s12x.c
vendored
@ -1,5 +1,5 @@
|
||||
/* BFD support for the Freescale 9S12X processor
|
||||
Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -24,18 +24,19 @@
|
||||
|
||||
const bfd_arch_info_type bfd_m9s12x_arch =
|
||||
{
|
||||
16, /* 16 bits in a word. */
|
||||
32, /* 16 bits in an address. */
|
||||
8, /* 8 bits in a byte. */
|
||||
bfd_arch_m9s12x,
|
||||
0,
|
||||
"m9s12x",
|
||||
"m9s12x",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
0,
|
||||
16, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_m9s12x,
|
||||
0,
|
||||
"m9s12x",
|
||||
"m9s12x",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user