1
1
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:
Rui Ueyama 2021-06-03 22:14:54 +09:00
parent 3bfefefb2d
commit fe76210da6
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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 |