OUTPUT_FORMAT is needed as the first line of libc.so (a linker script). The string comes from either (a) ld --verbose on /dev/null, get the output (the OUTPUT_FORMAT line and the continuation lines), feed the output to scripts/output-format.sed (b) ld --print-output-format Neither choice makes sense for LLD. It supports multi targets and there is not a preferred default target. Like gold, it does not have the concept of "an internal linker script". ld.lld --verbose does not print OUTPUT_FORMAT. As an alternative, we can get the string from objdump -f ``` % objdump -f /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6: file format elf64-x86-64 # LLVM>=11.0.0 (since https://reviews.llvm.org/D76046 ) % llvm-objdump -f /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6: file format elf64-x86-64 architecture: x86_64 start address: 0x0000000000026e00 ```
Fixed by https://sourceware.org/git/?p=glibc.git;a=commit;h=02d393f2483aedc4ce74e6edf8a15f063198041d ("install: Replace scripts/output-format.sed with objdump -f [BZ #26559]") a while ago.