Skip to content

Commit

Permalink
Makefile.main: Disable pie
Browse files Browse the repository at this point in the history
Attempts to work around the following issue with -fsanitize=address:

        [ RUN-TEST ]  ccan/check_type/test/run
==28662==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==28662==ASan shadow was supposed to be located in the [0x00007fff7000-0x10007fff7fff] range.
==28662==This might be related to ELF_ET_DYN_BASE change in Linux 4.12.
==28662==See google/sanitizers#856 for possible workarounds.
==28662==Process memory map follows:
...

Signed-off-by: Andrew Jeffery <[email protected]>
  • Loading branch information
amboar committed Oct 9, 2019
1 parent 01ba24e commit eadee7f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile.main
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ifeq ($(DEBUG),1)
CPPFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
endif

CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
CFLAGS := -fno-strict-aliasing -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
CFLAGS += -mcpu=power7
CFLAGS += -Wl,--oformat,elf64-powerpc -ggdb
CFLAGS += $(call try-cflag,$(CC),-ffixed-r13)
Expand Down Expand Up @@ -132,13 +132,12 @@ CFLAGS += $(call try-cflag,$(CC),-Wjump-misses-init) \

CFLAGS += $(CWARNS) $(OPTS) $(DBG)

LDFLAGS := -m64 -static -nostdlib -pie
LDFLAGS += -Wl,-pie
LDFLAGS := -m64 -static -nostdlib
LDFLAGS += -Wl,-Ttext-segment,$(LD_TEXT) -Wl,-N -Wl,--build-id=none
LDFLAGS += -Wl,--no-multi-toc
LDFLAGS += -mcpu=power7 -mbig-endian -Wl,--oformat,elf64-powerpc
LDFLAGS_FINAL = -EB -m elf64ppc --no-multi-toc -N --build-id=none --whole-archive
LDFLAGS_FINAL += -static -nostdlib -pie -Ttext-segment=$(LD_TEXT) --oformat=elf64-powerpc
LDFLAGS_FINAL += -static -nostdlib -Ttext-segment=$(LD_TEXT) --oformat=elf64-powerpc
LDFLAGS_FINAL += --orphan-handling=warn

LDRFLAGS=-melf64ppc
Expand Down

0 comments on commit eadee7f

Please sign in to comment.