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.
This commit is contained in:
Alan Modra 2020-08-31 10:03:59 +09:30
parent f2173852cf
commit a148a448ec
2 changed files with 26 additions and 14 deletions

View File

@ -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.

View File

@ -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
{