mirror of
https://github.com/rui314/mold.git
synced 2024-11-13 09:39:13 +03:00
Change the default build-id size from 20 to 16 bytes
GNU ld's default build-id size is 16.
This commit is contained in:
parent
3bfefefb2d
commit
fe76210da6
@ -647,7 +647,7 @@ void parse_nonpositional_args(Context<E> &ctx,
|
||||
ctx.arg.rpaths += arg;
|
||||
} else if (read_flag(args, "build-id")) {
|
||||
ctx.arg.build_id.kind = BuildId::HASH;
|
||||
ctx.arg.build_id.hash_size = 20;
|
||||
ctx.arg.build_id.hash_size = 16;
|
||||
} else if (read_arg(ctx, args, arg, "build-id")) {
|
||||
if (arg == "none") {
|
||||
ctx.arg.build_id.kind = BuildId::NONE;
|
||||
|
@ -8,7 +8,7 @@ mkdir -p $t
|
||||
echo 'int main() { return 0; }' > $t/a.c
|
||||
|
||||
clang -o $t/exe $t/a.c -fuse-ld=`pwd`/../mold -Wl,-build-id
|
||||
readelf -n $t/exe | grep -qv 'GNU.*0x00000010.*NT_GNU_BUILD_ID'
|
||||
readelf -n $t/exe | grep -q 'GNU.*0x00000010.*NT_GNU_BUILD_ID'
|
||||
|
||||
clang -o $t/exe $t/a.c -fuse-ld=`pwd`/../mold -Wl,-build-id=uuid
|
||||
readelf -nW $t/exe |
|
||||
|
Loading…
Reference in New Issue
Block a user