Browse Source

Don't pass the full LDFLAGS set to bgpdump creation. Closes: #945881

Passing LDFLAGS when linking the bgpdump program was meant to create
hardening builds - which actually did the trick. With a side effect
however: LDFLAGS contains the -shared option, resulting in a binary that
segfaults at the first function call.

Pass the linker flags for hardening build manually for the time being.
Christoph Biedl 1 year ago
parent
commit
3990f95b19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      debian/patches/use-ldflags-for-linking.patch

+ 1 - 1
debian/patches/use-ldflags-for-linking.patch

@@ -10,7 +10,7 @@ Last-Update: 2019-01-27
  
  bgpdump: bgpdump.c libbgpdump.a
 -	$(COMPILE) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
-+	$(COMPILE) $(LDFLAGS) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
++	$(COMPILE) -Wl,-z,relro -Wl,-z,now -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
  
  check-clean:
  	rm -f test_out/*.bgp.gz