Skip to content

Commit

Permalink
Added custom linker script.
Browse files Browse the repository at this point in the history
 * discard .xdata section (unwind data for SEH will be done in another way)

Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Oct 1, 2023
1 parent 54f3087 commit 649eef7
Show file tree
Hide file tree
Showing 4 changed files with 402 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ package:
help:
$(MAKE) -C $(DPP_ROOT) -f Makefile.deps help

.NOTPARALLEL: examples-clean deps-clean deps-distclean
.PHONY: examples deps deps-distclean deps-clean help
.DEFAULT_GOAL := deps
1 change: 1 addition & 0 deletions Makefile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@ help:
@echo -e '\tWERROR = $(WERROR)'
@echo -e '\tQ = $(Q)'

.NOTPARALLEL: distclean clean
.PHONY: all deps-print-local-notice deps-build deps package distclean clean help
.DEFAULT_GOAL := all
6 changes: 5 additions & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ ifneq ($(WERROR),)
CFLAGS += -Werror
endif

#PRINT_LDSCRIPT = -Wl,--verbose

CXXFLAGS := -fno-exceptions -fno-rtti -fuse-cxa-atexit
EASTL_CXXFLAGS := -I$(DPP_ROOT)/EASTL/include -I$(DPP_ROOT)/EASTL/test/packages/EABase/include/Common \
-DEASTL_USER_CONFIG_HEADER="<eastl_user_config.hpp>" \
Expand All @@ -81,7 +83,9 @@ DRIVER_LDFLAGS := -shared \
-Wl,--gc-sections \
-Wl,--exclude-all-symbols \
-Wl,--entry,_CRT_DriverEntry \
-nostartfiles -nodefaultlibs -nostdlib
$(PRINT_LDSCRIPT) \
-nostartfiles -nodefaultlibs -nostdlib \
-T$(DPP_ROOT)/ld-script.txt
DRIVER_LIBS := -lntoskrnl -lhal
USER_LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat -Wl,--gc-sections
USER_LIBS :=
Expand Down
Loading

0 comments on commit 649eef7

Please sign in to comment.