Skip to content

boulder/data: Add LLVM CREL tuning flags - #862

Open
joebonrichie wants to merge 1 commit into
mainfrom
crel-tuning
Open

boulder/data: Add LLVM CREL tuning flags#862
joebonrichie wants to merge 1 commit into
mainfrom
crel-tuning

Conversation

@joebonrichie

Copy link
Copy Markdown
Contributor

https://maskray.me/blog/2024-03-09-a-compact-relocation-format-for-elf

Reduces the size of .o/.a files.

Currently, final executables are unaffected as LLD consumes the crel symbols until support for DT_CREL is added to ABI and GNU toolchain

The primary benefit is reducing size on disk for cached builds

Be aware that ld.bfd cannot handle CREL static .a files.

A simple lzip build:

CREL disabled:
308K arg_parser.o
176K decoder.o
140K encoder_base.o
224K encoder.o
132K fast_encoder.o
112K list.o
248K lzip_index.o
608K main.o

CREL enabled:
264K arg_parser.o
152K decoder.o
120K encoder_base.o
196K encoder.o
116K fast_encoder.o
92K list.o
212K lzip_index.o
520K main.o

https://maskray.me/blog/2024-03-09-a-compact-relocation-format-for-elf

Reduces the size of .o/.a files.

Currently, final executables are unaffected as LLD consumes the crel
symbols until support for DT_CREL is added to ABI and GNU toolchain

The primary benefit is reducing size on disk for cached builds

Be aware that ld.bfd cannot handle CREL static .a files.

A simple lzip build:

CREL disabled:
308K    arg_parser.o
176K    decoder.o
140K    encoder_base.o
224K    encoder.o
132K    fast_encoder.o
112K    list.o
248K    lzip_index.o
608K    main.o

CREL enabled:
264K    arg_parser.o
152K    decoder.o
120K    encoder_base.o
196K    encoder.o
116K    fast_encoder.o
92K     list.o
212K    lzip_index.o
520K    main.o
@ermo

ermo commented Aug 28, 2026

Copy link
Copy Markdown
Member

This is wild. Sorry I missed it.

Could we link the toolchain commits/PRs to this PR so we know when it makes sense to begin testing with it against glibc/binutils/llvm packages which support CREL?

@joebonrichie

joebonrichie commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Waiting on ABI changes to be accepted: https://groups.google.com/g/generic-abi/c/ppkaxtLb0P0

There seems to be not much discussion on the GNU side unfortunately

glibc: https://sourceware.org/bugzilla/show_bug.cgi?format=multiple&id=31541
binutils: https://sourceware.org/bugzilla/show_bug.cgi?id=31475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants