Skip to contentSkip to conversation

s390x: Remove .note.gnu.build-id section from the ELF files

GIT PULL Thomas Huth 1 participant 1 message Jun 26, 2018

lore
Share & tools
lore
#0 lore raw

While debugging another problem, we noticed that the low memory contains some bytes which should not be there. Looks like the linker puts the ".note.gnu.build-id" section to address 0 if it has not explicitly specified in the linker script. ARM and powerpc unit tests are apparently already using --build-id=none to avoid this problem, so let's simply use this linker flag in the s390x builds, too.

---
 s390x/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +1 -1
index d4275a1..6546a02 100644
@@ -21,7 +21,7 @@ CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/s390x -I lib
 CFLAGS += -O2
 CFLAGS += -march=z900
 CFLAGS += -fno-delete-null-pointer-checks
-LDFLAGS += -nostdlib
+LDFLAGS += -nostdlib -Wl,--build-id=none
 
 # We want to keep intermediate files
 .PRECIOUS: %.o
Signature · 1 line
1.8.3.1