[PATCH] elf: Use uint64_t for common symbol alignment warning

H.J. Lu hjl.tools@gmail.com
Thu Oct 2 02:49:27 GMT 2025


Use uint64_t for common symbol alignment warning to avoid

elflink.c:5548:12: runtime error: shift exponent 37 is too large for 32-bit type
 'int'

with invalid input in PR ld/33500.  Now ld issues:

ld: warning: alignment 137438953472 of common symbol `__afl_global_area_ptr' in
pr33500.o is greater than the alignment (8) of its section *COM*

instead of

ld: warning: alignment 32 of common symbol `__afl_global_area_ptr' in pr33500.o
is greater than the alignment (8) of its section *COM*

PR ld/33511
* elflink.c (elf_link_add_object_symbols): Use uint64_t for
common symbol alignment warning.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Use-uint64_t-for-common-symbol-alignment-warning.patch
Type: text/x-patch
Size: 2527 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251002/a4af783c/attachment.bin>


More information about the Binutils mailing list