I was playing with passing -std=c99 to an older version of gcc by
using CC="gcc-4 -std=c99", and ran into
cc1plus: error: command line option ‘-std=c99’ is valid for C/ObjC but
not for C++ [-Werror]
This obvious fix uses the correct compiler for a number of gold
testcases.
* testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE.
(plugin_test_wrap_symbols_1.o): Likewise.
(plugin_test_wrap_symbols_2.o): Likewise.
* testsuite/Makefile.in: Regenerate.
Upon re-consideration in commit 569d50f1c6 ("x86: further refine SSE
check (SSE4a, SHA, GFNI)") I went too far: Mixing of SSE and AVX insns
doesn't suffer as bad a penalty on AMD CPUs as on Intel ones. SSE4a
being an AMD-only extension, it shouldn't be part of the ISA extensions
set for which the diagnostic may get issued. Undo that part.
2020-06-15 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
(elf32xtensa_abi): New global variable.
(xtensa_abi_choice): New function.
(elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
XSHAL_ABI to select PLT code.
gas/
* config/tc-xtensa.c (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New
macros.
(elf32xtensa_abi): New declaration.
(option_abi_windowed, option_abi_call0): New enum constants.
(md_longopts): Add entries for --abi-windowed and --abi-call0.
(md_parse_option): Add handlers for --abi-windowed and
--abi-call0.
(xtensa_add_config_info): Use xtensa_abi_choice instead of
XSHAL_ABI to format ABI tag.
* doc/as.texi (Target Xtensa options): Add --abi-windowed and
--abi-call0 to the list of options.
* doc/c-xtensa.texi: Add description for options --abi-windowed
and --abi-call0.
* testsuite/gas/xtensa/abi-call0.d: New test definition.
* testsuite/gas/xtensa/abi-windowed.d: New test definition.
* testsuite/gas/xtensa/abi.s: New test source.
include/
* elf/xtensa.h (xtensa_abi_choice): New declaration.
ld/
* emultempl/xtensaelf.em (XSHAL_ABI): Remove macro definition.
(XTHAL_ABI_UNDEFINED, XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New
macros.
(elf32xtensa_abi): New declaration.
(xt_config_info_unpack_and_check): Set elf32xtensa_abi if it is
undefined. Use xtensa_abi_choice instead of XSHAL_ABI to test
ABI tag consistency.
(xtensa_add_config_info): Use xtensa_abi_choice instead of
XSHAL_ABI to format ABI tag.
(PARSE_AND_LIST_PROLOGUE): Define OPTION_ABI_WINDOWED,
OPTION_ABI_CALL0 and declare elf32xtensa_abi.
(PARSE_AND_LIST_LONGOPTS): Add entries for --abi-windowed and
--abi-call0.
(PARSE_AND_LIST_OPTIONS): Add help text for --abi-windowed and
--abi-call0.
(PARSE_AND_LIST_ARGS_CASES): Add handlers for --abi-windowed and
--abi-call0.
* ld.texi: Add description for options --abi-windowed and
--abi-call0.
This simplifies the target_read_string API a bit.
Note that some code was using safe_strerror on the error codes
returned by target_read_string. It seems to me that this is incorrect
(if it was ever correct, it must have been quite a long time ago).
gdb/ChangeLog
2020-06-15 Tom Tromey <tromey@adacore.com>
* windows-nat.c (windows_nat::handle_output_debug_string):
Update.
(windows_nat::handle_ms_vc_exception): Update.
* target.h (target_read_string): Change API.
* target.c (target_read_string): Change API.
* solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
Update.
* solib-frv.c (frv_current_sos): Update.
* solib-dsbt.c (dsbt_current_sos): Update.
* solib-darwin.c (darwin_current_sos): Update.
* linux-thread-db.c (inferior_has_bug): Update.
* expprint.c (print_subexp_standard): Update.
* ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
(ada_exception_message_1): Update.
linux-tdep.c:dump_mapping_p uses target_read_string, but in a way that
does not really make sense. It's better to use target_read_memory
here.
gdb/ChangeLog
2020-06-15 Tom Tromey <tromey@adacore.com>
* linux-tdep.c (dump_mapping_p): Use target_read_memory.
read_memory_string is redundant and only called in a couple of spots.
This patch removes it in favor of target_read_string.
gdb/ChangeLog
2020-06-15 Tom Tromey <tromey@adacore.com>
* corefile.c (read_memory_string): Remove.
* ada-valprint.c (ada_value_print_ptr): Update.
* ada-lang.h (ada_tag_name): Change return type.
* ada-lang.c (type_from_tag): Update.
(ada_tag_name_from_tsd): Change return type. Use
target_read_string.
(ada_tag_name): Likewise.
* gdbcore.h (read_memory_string): Don't declare.
gdb/testsuite/ChangeLog:
2020-06-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename
variable.
* gdb.base/jit-reader-simple.exp: Fix typo ("Built" -> "Build"),
and use the already-defined 'options' variable.
The PowerPC PE support is so old and bitrotted that it ought to be
removed. Test results for a cross from x86_64 with no C cross
compiler currently shows 109 fails. I don't think anyone cares about
the target.
This FIXME in bfd/peXXigen.c has been around since 1999, git commit
277d1b5e45:
/* FIXME: This file has various tests of POWERPC_LE_PE. Those tests
worked when the code was in peicode.h, but no longer work now that
the code is in peigen.c. PowerPC NT is said to be dead. If
anybody wants to revive the code, you will have to figure out how
to handle those issues. */
and this one in gas/config/tc-ppc.c since 1995, git commit
cd557d83d6:
* FIXME: I just noticed this. This doesn't work at all really. It it
* setting bits that bfd probably neither understands or uses. The
* correct approach (?) will have to incorporate extra fields attached
* to the section to hold the system specific stuff. (krk)
* config.bfd: Obsolete powerpcle-*-pe targets.
PR 26103
* elflink.c (elf_link_add_archive_symbols): Exclude undefined
symbols that were defined in discarded sections.
* cofflink.c (coff_link_check_archive_element): Likewise.
(coff_link_add_symbols): Set indx to -3 for symbols defined in
discarded sections.
(_bfd_coff_write_global_sym): Don't emit such symbols.
libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
libcoff.h: Regenerate.
* testsuite/ld-linkonce/zeroeh_x.s: Rename from x.s.
* testsuite/ld-linkonce/zeroeh_y.s: Rename from y.s.
* testsuite/ld-linkonce/zeroehl32.d: Adjust for renaming. Support
big-endian output. Run for powerpc.
Fixes this testsuite fail on Windows:
FAIL: gdb.base/fullpath-expand.exp: rbreak XXX/fullpath-expand-func.c:func
If the found colon is actually part of a Windows drive, look for another.
gdb/ChangeLog:
2020-06-14 Hannes Domani <ssbssa@yahoo.de>
* symtab.c (rbreak_command): Ignore Windows drive colon.
This port has been unmaintained for years and the upstream Linux kernel
does not support this architecture anymore, remove it.
gdbserver/ChangeLog:
* Makefile.in (SFILES): linux-tile-low.cc.
* configure.srv: Remove tilegx case.
* linux-tile-low.cc: Remove.
Change-Id: I1c2910d04ddbd6013e5d228047106b41d80f9477
This port has been unmaintained for years and the upstream Linux kernel
does not support this architecture anymore, remove it.
gdbserver/ChangeLog:
* Makefile.in (SFILES): Remove linux-m32r-low.cc.
* configure.srv: Remove m32r case.
* linux-m32r-low.cc: Remove.
Change-Id: I5617b2b1fd92aeec19b38e0e3c0b78adaafdb35b
This port has been unmaintained for years and the upstream Linux kernel
does not support this architecture anymore, remove it.
gdbserver/ChangeLog:
* Makefile.in (SFILES): Remove linux-cris-low.c.
* configure.srv: Remove cris cases.
* linux-cris-low.cc, linux-crisv32-low.cc: Remove.
Change-Id: Ib3ff436b03373548215f15540a47f39cbec5f512
This port has been unmaintained for years and the upstream Linux kernel
does not support this architecture anymore, remove it.
gdbserver/ChangeLog:
* Makefile.in (SFILES): Remove linux-bfin-low.c.
* configure.srv: Remove bfin case.
* linux-bfin-low.cc: Remove.
* linux-low.cc: Remove BFIN-conditional code.
Change-Id: I846310d15e6386118ec7eabb1b87e647174560fb
This port has been unmaintained for years, remove it.
gdbserver/ChangeLog:
* configure: Re-generate.
* configure.ac: Remove srv_qnx test.
* configure.srv: Remove nto case.
* nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
* remote-utils.c: Remove __QNX__-guarded code.
Change-Id: I8a1ad9c740a69352da1f6993778dbf951eebb22f
This port has been unmaintained for years, remove it.
gdbserver/ChangeLog:
* configure: Re-generate.
* configure.ac: Remove srv_lynxos test.
* configure.srv: Remove lynxos cases.
* lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
Remove.
Change-Id: I239d1cf1fc7b4c7a174251bc7981707eaba7d972
Fix a few outdated or incoherent things in the README:
- Don't mention remote.c nor *-stub.c files as references for the remote
protocol. remote.c is in GDB, not GDBserver, and *-stub.c files don't
exist today. Add a link to the documentation instead.
- In the "server (target) side" section, use `:2345` instead of
`host:2345`. It currently says that using `host:2345` means we would
expect a connection from `host`. That's not what I would expect by
passing a host part here. If I passed `11.22.33.44:2345` as the listen
address, I would expect it to instruct gdbserver to listen only on that
(11.22.33.44) network interface, not to expect a connection from host
`11.22.33.44`. So, remove that part of the sentence.
- Remove the list of supported target, refer to configure.srv instead.
Keeping a list here is bound to lose sync with reality.
- In the cross-compile instructions, I don't think it's necessary to mention
"In a Bourne shell".
- In the cross-compile instructions, I don't know what passing
`your-target-name` to configure does, I don't think it's valid. Use
`make all-gdbserver` as in the instructions just above.
gdbserver/ChangeLog:
* README: Fix a few outdated or incoherent things.
Change-Id: I79349e25bc1bc53447855e0dea6cc7b9630f4553
When building gdb including gdbserver with CFLAGS/CXXFLAGS -O2 -g -flto=auto,
I run into:
...
src/gdbserver/../gdbsupport/agent.h:47:13: error: type of 'debug_agent' \
does not match original declaration [-Werror=lto-type-mismatch]
extern bool debug_agent;
^
src/gdbserver/ax.cc:28:5: note: type 'int' should match type 'bool'
int debug_agent = 0;
^
src/gdbserver/ax.cc:28:5: note: 'debug_agent' was previously declared here
src/gdbserver/ax.cc:28:5: note: code may be misoptimized unless \
-fno-strict-aliasing is used
...
Fix this by changing the type of debug_agent in ax.cc from int to bool.
Tested on x86_64-linux.
Many of the test scripts create variables in the global namespace,
these variables will then be present for the following test scripts.
In most cases this is harmless, but in some cases this can cause
problems.
For example, if a variable is created as an array in one script, but
then assigned as a scalar in a different script, this will cause a TCL
error.
The solution proposed in this patch is to have the GDB test harness
record a list of all known global variables at the point just before
we source the test script. Then, after the test script has run, we
again iterate over all global variables. Any variable that was not in
the original list is deleted, unless it was marked as a persistent global
variable using gdb_persistent_global.
The assumption here is that no test script should need to create a
global variable that will outlive the lifetime of the test script
itself. With this patch in place all tests currently seem to pass, so
the assumption seems to hold.
gdb/testsuite/ChangeLog:
2020-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_known_globals, gdb_persistent_globals): New global.
(gdb_persistent_global, gdb_persistent_global_no_decl): New proc.
(gdb_setup_known_globals): New proc.
(gdb_cleanup_globals): New proc.
* lib/gdb.exp (load_lib): New override proc.
(gdb_stdin_log_init): Set var in_file as persistent global.
* lib/pascal.exp (gdb_stdin_log_init): Set vars
pascal_compiler_is_gpc, pascal_compiler_is_fpc, gpc_compiler and
fpc_compiler as persistent global.
In lib/tuiterm.exp the builtin spawn is overridden by a tui-specific version.
After running the first test-case that imports tuiterm.exp, the override
remains active, so it can cause trouble in subsequent test-cases, even if they
do not import tuiterm.exp. See f.i. commit c8d4f6dfd9 "[gdb/testsuite] Fix
spawn in tuiterm.exp".
Fix this by:
- adding a variable gdb_finish_hooks which is a list of procs to run during
gdb_finish
- adding a proc tuiterm_env that is used in test-cases instead of
"load_lib tuiterm.exp".
- letting tuiterm_env:
- install the tui-specific spawn version, and
- use the gdb_finish_hooks to schedule restoring the builtin spawn
version.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-06-12 Tom de Vries <tdevries@suse.de>
* lib/tuiterm.exp (spawn): Rename to ...
(tui_spawn): ... this.
(toplevel): Move rename of spawn ...
(gdb_init_tuiterm): ... here. New proc.
(gdb_finish_tuiterm): New proc.
* lib/gdb.exp (gdb_finish_hooks): New global var.
(gdb_finish): Handle gdb_finish_hooks.
(tuiterm_env): New proc.
* gdb.python/tui-window.exp: Replace load_lib tuiterm.exp with
tuiterm_env.
* gdb.tui/basic.exp: Same.
* gdb.tui/corefile-run.exp: Same.
* gdb.tui/empty.exp: Same.
* gdb.tui/list-before.exp: Same.
* gdb.tui/list.exp: Same.
* gdb.tui/main.exp: Same.
* gdb.tui/new-layout.exp: Same.
* gdb.tui/regs.exp: Same.
* gdb.tui/resize.exp: Same.
* gdb.tui/tui-layout-asm-short-prog.exp: Same.
* gdb.tui/tui-layout-asm.exp: Same.
* gdb.tui/tui-missing-src.exp: Same.
* gdb.tui/winheight.exp: Same.
Say we add a call to foobar at the end of a test-case, and run the
test-suite. We'll run into a dejagnu error:
...
ERROR: (DejaGnu) proc "foobar" does not exist.
...
and the test-suite run is aborted.
It's reasonable that the test-case is aborted, but it's not reasonable that
the testsuite run is aborted.
Problems in one test-case should not leak into other test-cases, and they
generally don't. The exception is the "invalid command name" problem due to
an override of ::unknown in dejagnu's framework.exp.
Fix this by reverting dejagnu's ::unknown override for the duration of each
test-case, using the gdb_init/gdb_finish hooks.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-06-12 Tom de Vries <tdevries@suse.de>
PR testsuite/26110
* lib/gdb.exp (gdb_init): Revert dejagnu's override of ::unknown.
(gdb_finish): Reinstall dejagnu's override of ::unknown.
We add new arguments defined and aborted verisons for DECLARE_CSR to
support privileged versions controling in binutils. Therefore, the
rebuild-csr-xml.sh should be updated, too.
gdb/
* features/riscv/rebuild-csr-xml.sh: Updated.
There is a conflict between v1.9 and v1.9.1 - CSR MISA address. MISA is
0xf10 in v1.9, but change to 0x301 in v1.9.1. The change made MISA writable,
but may also cause risk of compatibility. Binutils already support the
-mpriv-spec options and ELF priv attributes, which can used to choose what
privileged spec you want, and then give a correponding CSR name and address
to use. But Gdb and other tools don't have the simialr mechanism for now.
However, there are two things can be confirmed,
1. If we don't have a way to control the priv specs, then the changes, like
MISA, will cause risk and hard to maintain.
2. We get the guarantee that the CSR address won't be reused in the future
specs, even if it is dropped.
I'm not sure if Gdb needs to care about the priv spec versions, it is still
discussing. But drop the priv spec v1.9, and make sure that we won't reuse
the CSR address is a useful solution for now. Also, we might drop the v1.9.1
in a year or two. After that, specs above v1.10 should be compatible anyway.
gas/
* testsuite/gas/riscv/priv-reg-fail-version-1p9.d: Removed.
* testsuite/gas/riscv/priv-reg-fail-version-1p9.l: Likewise.
* testsuite/gas/riscv/priv-reg-version-1p9.d: Likewise.
include/
* opcode/riscv-opc.h: Update the defined versions of CSR from
PRIV_SPEC_CLASS_1P9 to PRIV_SPEC_CLASS_1P9P1. Also, drop the
MISA DECLARE_CSR_ALIAS since it's aborted version is v1.9.
* opcode/riscv.h (enum riscv_priv_spec_class): Remove
PRIV_SPEC_CLASS_1P9.
opcodes/
* riscv-opc.c (priv_specs): Remove v1.9 and PRIV_SPEC_CLASS_1P9.
.gdb_index now supports Ada, so update the documentation to reflect
this.
gdb/doc/ChangeLog
2020-06-11 Tom Tromey <tromey@adacore.com>
* gdb.texinfo (Index Files): Reword. Remove Ada limitation.
PR gdb/18318 notes that gdb will sometimes incorrectly handle hex
floating point input. This turns out to be a bug in the C lexer; the
'p' was not being correctly recognized, and so the exponent was not
always passed to the floating point "from_string" method.
Tested by the buildbot "Fedora-x86_64-m64" builder.
gdb/ChangeLog
2020-06-11 Tom Tromey <tom@tromey.com>
PR gdb/18318:
* c-exp.y (lex_one_token): Handle 'p' like 'e'.
gdb/testsuite/ChangeLog
2020-06-11 Tom Tromey <tom@tromey.com>
PR gdb/18318:
* gdb.base/printcmds.exp (test_float_accepted): Add more hex
floating point tests.
A few user-vibisble changes to the --help output:
* Remove unnecessary quotes around bug url.
* Mention the mailing list and IRC channel as places where users can
ask GDB-related questions.
* Add empty lines between items in the footer, to improve readability.
* Remove unnecessary new line at the end of output.
2020-06-09 Jonny Grant <jg@jguk.org>
2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
* main.c (captured_main_1): Don't print new line after help.
(print_gdb_help): add mailing list and IRC channel information
to --help. Add new lines between items in the footer. Remove
quotes around bug url.
Signed-off-by: Jonathan Grant <jg@jguk.org>
Change-Id: Ibd0746a348d558fb35b5cd7e366f107742806565
This patch fixes gdb/21356 in which we hit an assertion in
value_contents_bits_eq:
(gdb) p container_object2
(gdb) p container_object2
$1 = {_container_member2 = 15, _vla_struct_object2 = {_some_member = 0,
_vla_field = {
../../src/gdb/value.c:829: internal-error: \
int value_contents_bits_eq(const value*, int, const value*, int, int): \
Assertion `offset1 + length \
<= TYPE_LENGTH (val1->enclosing_type) * TARGET_CHAR_BIT' failed.
This is happening because TYPE_LENGTH (val1->enclosing_type) is erroneously
based on enclosing_type, which is a typedef, instead of the actual underlying
type.
This can be traced back to resolve_dynamic_struct, where the size of the
type is computed:
...
TYPE_FIELD_TYPE (resolved_type, i)
= resolve_dynamic_type_internal (TYPE_FIELD_TYPE (resolved_type, i),
&pinfo, 0);
gdb_assert (TYPE_FIELD_LOC_KIND (resolved_type, i)
== FIELD_LOC_KIND_BITPOS);
new_bit_length = TYPE_FIELD_BITPOS (resolved_type, i);
if (TYPE_FIELD_BITSIZE (resolved_type, i) != 0)
new_bit_length += TYPE_FIELD_BITSIZE (resolved_type, i);
else
new_bit_length += (TYPE_LENGTH (TYPE_FIELD_TYPE (resolved_type, i))
* TARGET_CHAR_BIT);
...
In this function, resolved_type is TYPE_CODE_TYPEDEF which is not what we
want to use to calculate the size of the actual field.
This patch fixes this and the similar problem in resolve_dynamic_union.
gdb/ChangeLog:
2020-06-11 Keith Seitz <keiths@redhat.com>
PR gdb/21356
* gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
Resolve typedefs for type length calculations.
gdb/testsuite/ChangeLog:
2020-06-11 Keith Seitz <keiths@redhat.com>
PR gdb/21356
* gdb.base/vla-datatypes.c (vla_factory): Add typedef for struct
vla_struct.
Add new struct vla_typedef and union vla_typedef_union and
corresponding instantiation objects.
Initialize new objects.
* gdb.base/vla-datatypes.exp: Add tests for vla_typedef_struct_object
and vla_typedef_union_object.
Fixup type for vla_struct_object.
Test-case gdb.base/dbx.exp overrides:
- the GDBFLAGS variable
- the gdb_file_cmd proc
There's code at the end of the test-case to restore both, but that's not
guaranteed to be executed.
Fix this by:
- using save_vars to restore GDBFLAGS
- using a new proc with_override to restore gdb_file_cmd
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-06-11 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (with_override): New proc, factored out of ...
* gdb.base/dbx.exp: ... here. Use with_override and save_vars.
Prior to this patch, the information describing the AArch64 system
registers was separate from the information describing which system
registers are available depending on the CPU feature set. Indeed, the
latter was implemented as a separate function from the main table with
the system register information.
This patch remedies this situation and puts the feature information into
the system register table itself.
This has several advantages:
* Having all the information described in one place is easier to
maintain.
* The logic to check whether a system register is supported now becomes
trivial (and much more efficient).
Since this patch ended up touching every line of the system register
table, I took the opportunity to make the formatting more consistent and
remove some redundant comments.
Note that there is still more refactoring that could be done along the
same lines here (e.g. with the TLB instructions) but this seemed like a
reasonable first pass.
Testing:
* Regression tested an x64 -> aarch64-none-elf cross binutils.
* Built aarch64-none-elf cross toolchain, checked newlib startup
code still works.
* Bootstrapped binutils on aarch64-linux-gnu, regression tested.
* Built aarch64 kernel using new binutils with allyesconfig.
OK for master? If so, I'll need a maintainer to commit on my behalf
since I don't have write access.
Thanks,
Alex
---
include/ChangeLog:
2020-06-11 Alex Coplan <alex.coplan@arm.com>
* opcode/aarch64.h (aarch64_sys_reg): Add required features to struct
describing system registers.
opcodes/ChangeLog:
2020-06-11 Alex Coplan <alex.coplan@arm.com>
* aarch64-opc.c (SYSREG): New macro for describing system registers.
(SR_CORE): Likewise.
(SR_FEAT): Likewise.
(SR_RNG): Likewise.
(SR_V8_1): Likewise.
(SR_V8_2): Likewise.
(SR_V8_3): Likewise.
(SR_V8_4): Likewise.
(SR_PAN): Likewise.
(SR_RAS): Likewise.
(SR_SSBS): Likewise.
(SR_SVE): Likewise.
(SR_ID_PFR2): Likewise.
(SR_PROFILE): Likewise.
(SR_MEMTAG): Likewise.
(SR_SCXTNUM): Likewise.
(aarch64_sys_regs): Refactor to store feature information in the table.
(aarch64_sys_reg_supported_p): Collapse logic for system registers
that now describe their own features.
(aarch64_pstatefield_supported_p): Likewise.
lto-6.c refers to _etext, pr12760b.c has a .gnu.warning section,
the pr23818 test uses readelf, and pr23958.c has a .symver directive.
* testsuite/ld-plugin/lto.exp (lto_link_tests): Move lto-6,
pr12760, pr23818 and pr23958 tests to..
(lto_link_elf_tests): ..here.
Let's do without that unnecessary internal option buffer. This also
fixes another bug in that the REGINFO data was being taken from the
calloc'd internal option buffer, so was all zeros.
* readelf.c (process_mips_specific): Don't alloc memory for
Elf_Internal_Options.
DT_MIPS_OPTIONS is not a regular array as assumed by readelf. This
patch corrects that assumption, and to do so easily, makes various
internal (host byte order) structs the same size as external (target
byte order) structs.
include/
* elf/mips.h (Elf32_RegInfo): Use fixed width integer types.
(Elf64_Internal_RegInfo, Elf_Internal_Options): Likewise.
binutils/
* readelf.c (process_mips_specific): Assert size of internal
types match size of external types, and simplify allocation of
internal buffer. Catch possible integer overflow when sanity
checking option size. Don't assume options are a regular array.
Sanity check reginfo option against option size. Use PRI macros
when printing.
gdb/doc/ChangeLog:
* gdb.texinfo: Remove broken links Previous and Up from
contents.
Signed-off-by: Jonny Grant <jg@jguk.org>
Change-Id: Iad7323580a3c0c7f00eab1264d66f39e8d156e38