diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2023-07-09 22:22:11 -0700 |
---|---|---|
committer | Jerry Zhao <jerryz123@berkeley.edu> | 2023-07-11 18:53:54 -0700 |
commit | 3b0d3c2004e97bbbcc1ae17a4053f1913b01991f (patch) | |
tree | 787daefac40fc7983b44eea5adb2b8da60d40992 /spike_main | |
parent | fe0576044590751e0a10a22ec28077f72d8c5414 (diff) | |
download | riscv-isa-sim-3b0d3c2004e97bbbcc1ae17a4053f1913b01991f.zip riscv-isa-sim-3b0d3c2004e97bbbcc1ae17a4053f1913b01991f.tar.gz riscv-isa-sim-3b0d3c2004e97bbbcc1ae17a4053f1913b01991f.tar.bz2 |
build: Force inclusion of all symbols from extension.o in spike-main
The --extension feature requires that all symbols in extension.o
be available when the libraries are dynamically loaded by dlopen.
Prepending extension.o to the linker command adds the otherwise
omitted symbols to spike's dynamic symbol table.
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/spike_main.mk.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spike_main/spike_main.mk.in b/spike_main/spike_main.mk.in index 25a7a6c..c842c4e 100644 --- a/spike_main/spike_main.mk.in +++ b/spike_main/spike_main.mk.in @@ -14,3 +14,7 @@ spike_main_install_prog_srcs = \ spike_main_srcs = \ spike_main_CFLAGS = -fPIC + +# This hack adds all symbols from extension.o to spike's dynamic symbol +# table, which is required for dynamically loaded --extension libraries +spike_main_LDFLAGS = extension.o |