diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-31 10:03:59 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-31 20:28:09 +0930 |
commit | a148a448ec071faaf0af4d5eaad6178eded35477 (patch) | |
tree | 04b7e9a35fa104103ec2a83af25bfc7ab0299d49 | |
parent | f2173852cff1459b04db4d84debbbf8961d6e23e (diff) | |
download | gdb-a148a448ec071faaf0af4d5eaad6178eded35477.zip gdb-a148a448ec071faaf0af4d5eaad6178eded35477.tar.gz gdb-a148a448ec071faaf0af4d5eaad6178eded35477.tar.bz2 |
PR26457 UBSAN: som.c:1794 left shift cannot be represented
PR 26457
* som/aout.h (SOM_SUBSPACE_ACCESS_CONTROL_BITS_MASK): Make unsigned.
(SOM_SUBSPACE_MEMORY_RESIDENT, SOM_SUBSPACE_DUP_COMMON)
(SOM_SUBSPACE_IS_COMMON, SOM_SUBSPACE_IS_LOADABLE)
(SOM_SUBSPACE_QUADRANT_MASK, SOM_SUBSPACE_INITIALLY_FROZEN)
(SOM_SUBSPACE_IS_FIRST, SOM_SUBSPACE_CODE_ONLY)
(SOM_SUBSPACE_SORT_KEY_MASK, SOM_SUBSPACE_REPLICATE_INIT)
(SOM_SUBSPACE_CONTINUATION, SOM_SUBSPACE_IS_TSPECIFIC)
(SOM_SUBSPACE_IS_COMDAT): Likewise.
-rw-r--r-- | include/ChangeLog | 12 | ||||
-rw-r--r-- | include/som/aout.h | 28 |
2 files changed, 26 insertions, 14 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 4da03f8..c76d9cc 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,15 @@ +2020-08-31 Alan Modra <amodra@gmail.com> + + PR 26457 + * som/aout.h (SOM_SUBSPACE_ACCESS_CONTROL_BITS_MASK): Make unsigned. + (SOM_SUBSPACE_MEMORY_RESIDENT, SOM_SUBSPACE_DUP_COMMON) + (SOM_SUBSPACE_IS_COMMON, SOM_SUBSPACE_IS_LOADABLE) + (SOM_SUBSPACE_QUADRANT_MASK, SOM_SUBSPACE_INITIALLY_FROZEN) + (SOM_SUBSPACE_IS_FIRST, SOM_SUBSPACE_CODE_ONLY) + (SOM_SUBSPACE_SORT_KEY_MASK, SOM_SUBSPACE_REPLICATE_INIT) + (SOM_SUBSPACE_CONTINUATION, SOM_SUBSPACE_IS_TSPECIFIC) + (SOM_SUBSPACE_IS_COMDAT): Likewise. + 2020-08-28 Cooper Qu <cooper.qu@linux.alibaba.com> * elf/csky.h (SHT_CSKY_ATTRIBUTES): Define. diff --git a/include/som/aout.h b/include/som/aout.h index 01b301f..e3675cc 100644 --- a/include/som/aout.h +++ b/include/som/aout.h @@ -157,22 +157,22 @@ struct som_external_subspace_dictionary_record }; #define SOM_SUBSPACE_ACCESS_CONTROL_BITS_SH 25 -#define SOM_SUBSPACE_ACCESS_CONTROL_BITS_MASK 0x7f -#define SOM_SUBSPACE_MEMORY_RESIDENT (1 << 24) -#define SOM_SUBSPACE_DUP_COMMON (1 << 23) -#define SOM_SUBSPACE_IS_COMMON (1 << 22) -#define SOM_SUBSPACE_IS_LOADABLE (1 << 21) +#define SOM_SUBSPACE_ACCESS_CONTROL_BITS_MASK 0x7fU +#define SOM_SUBSPACE_MEMORY_RESIDENT (1U << 24) +#define SOM_SUBSPACE_DUP_COMMON (1U << 23) +#define SOM_SUBSPACE_IS_COMMON (1U << 22) +#define SOM_SUBSPACE_IS_LOADABLE (1U << 21) #define SOM_SUBSPACE_QUADRANT_SH 19 -#define SOM_SUBSPACE_QUADRANT_MASK 0x3 -#define SOM_SUBSPACE_INITIALLY_FROZEN (1 << 18) -#define SOM_SUBSPACE_IS_FIRST (1 << 17) -#define SOM_SUBSPACE_CODE_ONLY (1 << 16) +#define SOM_SUBSPACE_QUADRANT_MASK 0x3U +#define SOM_SUBSPACE_INITIALLY_FROZEN (1U << 18) +#define SOM_SUBSPACE_IS_FIRST (1U << 17) +#define SOM_SUBSPACE_CODE_ONLY (1U << 16) #define SOM_SUBSPACE_SORT_KEY_SH 8 -#define SOM_SUBSPACE_SORT_KEY_MASK 0xff -#define SOM_SUBSPACE_REPLICATE_INIT (1 << 7) -#define SOM_SUBSPACE_CONTINUATION (1 << 6) -#define SOM_SUBSPACE_IS_TSPECIFIC (1 << 5) -#define SOM_SUBSPACE_IS_COMDAT (1 << 4) +#define SOM_SUBSPACE_SORT_KEY_MASK 0xffU +#define SOM_SUBSPACE_REPLICATE_INIT (1U << 7) +#define SOM_SUBSPACE_CONTINUATION (1U << 6) +#define SOM_SUBSPACE_IS_TSPECIFIC (1U << 5) +#define SOM_SUBSPACE_IS_COMDAT (1U << 4) struct som_external_compilation_unit { |