mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #1824 - Support SunOS Linker mapfiles. (42db0b33)
This commit is contained in:
@@ -439,6 +439,10 @@ EXTRA_DSO_LDOPTS += -Wl,--version-script,$(SYMBOLS_FILE)
|
||||
else
|
||||
ifeq ($(OS_TARGET),Darwin)
|
||||
EXTRA_DSO_LDOPTS += -Wl,-exported_symbols_list,$(SYMBOLS_FILE)
|
||||
else
|
||||
ifeq ($(OS_TARGET),SunOS)
|
||||
EXTRA_DSO_LDOPTS += -Wl,-M,$(SYMBOLS_FILE)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -83,6 +83,20 @@ def generate_symbols_file(output, *args):
|
||||
# };
|
||||
output.write('{\nglobal:\n %s;\nlocal:\n *;\n};'
|
||||
% ';\n '.join(symbols))
|
||||
elif buildconfig.substs['OS_TARGET'] == 'SunOS':
|
||||
# A linker version script is generated for Sun LD that looks like the
|
||||
# following:
|
||||
# $mapfile_version 2
|
||||
# SYMBOL_VERSION SUNW_1.1 {
|
||||
# global:
|
||||
# symbol1;
|
||||
# symbol2;
|
||||
# ...
|
||||
# local:
|
||||
# *;
|
||||
# };
|
||||
output.write('$mapfile_version 2\nSYMBOL_VERSION SUNW_1.1 {\nglobal:\n %s;\nlocal:\n *;\n};'
|
||||
% ';\n '.join(symbols))
|
||||
elif buildconfig.substs['OS_TARGET'] == 'Darwin':
|
||||
# A list of symbols is generated for Apple ld that simply lists all
|
||||
# symbols, with an underscore prefix.
|
||||
|
||||
Reference in New Issue
Block a user