diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-11 13:32:25 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-11 21:14:19 +1030 |
commit | 13c9c48599ebc8ad2f3a1fb9f672740219cd3841 (patch) | |
tree | b304237be09f4f06469122cdcdda658299ebb1ba /bfd/netbsd.h | |
parent | 09c78487342254de6a4498f8b3aa1f3f1d508898 (diff) | |
download | gdb-13c9c48599ebc8ad2f3a1fb9f672740219cd3841.zip gdb-13c9c48599ebc8ad2f3a1fb9f672740219cd3841.tar.gz gdb-13c9c48599ebc8ad2f3a1fb9f672740219cd3841.tar.bz2 |
bfd signed overflow fixes
Aimed at quietening ubsan.
include/
* opcode/mmix.h (PUSHGO_INSN_BYTE): Make unsigned.
(GO_INSN_BYTE, SETL_INSN_BYTE, INCML_INSN_BYTE, INCMH_INSN_BYTE),
(INCH_INSN_BYTE, SWYM_INSN_BYTE, JMP_INSN_BYTE): Likewise.
bfd/
* elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow.
* libaout.h (N_SET_INFO, N_SET_FLAGS): Likewise.
* netbsd.h (write_object_contents): Likewise.
* elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
* libhppa.h (HPPA_R_CONSTANT): Don't signed extend with shifts.
(stm32l4xx_create_replacing_stub_vldm): Don't truncate high bits
with shifts.
* elf32-nds32.h (R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG): Define
using 1u shifted left. Ditto for other macros.
* mmo.c (LOP): Make unsigned.
Diffstat (limited to 'bfd/netbsd.h')
-rw-r--r-- | bfd/netbsd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/netbsd.h b/bfd/netbsd.h index b5a1302..3e98140 100644 --- a/bfd/netbsd.h +++ b/bfd/netbsd.h @@ -104,7 +104,7 @@ MY (write_object_contents) (bfd *abfd) /* XXX aren't there any macro to change byteorder of a word independent of the host's or target's endiannesses? */ execp->a_info - = (execp->a_info & 0xff) << 24 | (execp->a_info & 0xff00) << 8 + = (execp->a_info & 0xffu) << 24 | (execp->a_info & 0xff00) << 8 | (execp->a_info & 0xff0000) >> 8 | (execp->a_info & 0xff000000) >> 24; #endif |