From 766583fff1012b6c9c7eac59d4df002cf253b160 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 28 Sep 2015 02:38:56 -0700 Subject: cleanly remove .note.gnu.build-id --- build_helpers/compile.sh | 2 +- linker.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_helpers/compile.sh b/build_helpers/compile.sh index 8f4f376..90c2ee2 100755 --- a/build_helpers/compile.sh +++ b/build_helpers/compile.sh @@ -7,7 +7,7 @@ INBASEPATH="${INPATH%.*}" # mangle such that no two names conflict (a/b/c and a/b.c conflicting would be no fun) OUTNAME="$(echo "$INBASEPATH" | sed 's/\./../g' | sed 's/\//._/g')" echo -n "[*] Building '$INPATH' to 'tmp/$OUTNAME'... " -gcc -T linker.ld -m32 -nostartfiles -nostdlib -ffreestanding "$INPATH" -o "tmp/$OUTNAME".o +gcc -T linker.ld -m32 -Wl,--build-id=none -nostartfiles -nostdlib -ffreestanding "$INPATH" -o "tmp/$OUTNAME".o echo " OK!" echo -n "[+] Stripping unnecessary sections... " objcopy -R .note.gnu.build-id -R .comment -O binary "tmp/$OUTNAME".o "bin/$OUTNAME".bin diff --git a/linker.ld b/linker.ld index 5fd7736..aff67ad 100644 --- a/linker.ld +++ b/linker.ld @@ -18,7 +18,7 @@ SECTIONS .bss : ALIGN(0x100) { *(.bss) } - /DISCARD/ : { *(.note.gnu.build-id) } + /DISCARD/ : { *(*) } /* The compiler may produce other sections, by default it will put them in a segment with the same name. Simply add stuff here as needed. */ -- cgit v1.1