Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
---|---|---|
17 | If we don't support binutils<2.35 (compiler-rt is built by GCC), we may use .section .text,"ax",%progbits,unique,__COUNTER__ ;\ to save a few bytes in the string table. How old GCC do we support for compiler-rt? |
so they can be removed by --gc-sections.
This is not accurate. --gc-sections can apply to the monolithic .text with all callbacks. If all callbacks are unused, the whole .text is discarded.
It's probably just unrealistic for a large application where at least some are nearly guaranteed to be used.
Adding .section directives switches to fragmented text sections, which can be individually discarded.
Since we assume that a large portion of callbacks will not be called in a typical application, this can save a lot of space in the linker output.
compiler-rt/lib/asan/asan_rtl_x86_64.S | ||
---|---|---|
17 | Thanks for the hint. I will submit as because saving few bytes is not worth risking version complications. |
If we don't support binutils<2.35 (compiler-rt is built by GCC), we may use .section .text,"ax",%progbits,unique,__COUNTER__ ;\ to save a few bytes in the string table.
How old GCC do we support for compiler-rt?