Skip to content

Commit

Permalink
build: link with --orphan-handling=warn
Browse files Browse the repository at this point in the history
The linker can warn when the linker script does not explicitly place
all sections. These orphan sections are placed according to
heuristics, which may not always be desirable. Enable this warning.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
npiggin authored and stewartsmith committed Apr 17, 2019
1 parent 208ca81 commit 7f22e25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile.main
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ 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 += --orphan-handling=warn

LDRFLAGS=-melf64ppc
# Debug stuff
#LDFLAGS += -Wl,-v -Wl,-Map,foomap
Expand Down

0 comments on commit 7f22e25

Please sign in to comment.