[PATCH] D42823: Strip .note.gnu.build-id sections if --build-id is given.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 15:41:18 PST 2018


Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
> +# RUN: ld.lld --build-id=0xcafebabe -o %t2.o %t1.o
> +# RUN: ld.lld --build-id=0xdeadbeef -o %t.exe %t2.o

In here %t2.o is actually an executable. When trying to link %t.exe gold
errors with

ld.gold: error: test2.o: unsupported ELF file type 2

Could we do the same (with a better error message)?

Cheers,
Rafael


More information about the llvm-commits mailing list