Fix missing symbols in <stubbed>libroot.so.
* A couple of symbols reuse the same address (via weak symbols), so we adjust generate_stubs.py accordingly.
This commit is contained in:
@@ -16,7 +16,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
local stubsObject = $(stubsSource:S=$(SUFOBJ)) ;
|
local stubsObject = $(stubsSource:S=$(SUFOBJ)) ;
|
||||||
CCFLAGS on $(stubsObject) = -Wno-missing-prototypes -fno-builtin ;
|
CCFLAGS on $(stubsObject) = -Wno-missing-prototypes -fno-builtin ;
|
||||||
Depends $(stubsObject) : $(stubsSource) ;
|
Depends $(stubsObject) : $(stubsSource) ;
|
||||||
Objects $(stubsSource) ;
|
BootstrapStage0PlatformObjects $(stubsSource) ;
|
||||||
local stubbedLibroot
|
local stubbedLibroot
|
||||||
= [ MultiArchDefaultGristFiles libroot.so : stubbed ] ;
|
= [ MultiArchDefaultGristFiles libroot.so : stubbed ] ;
|
||||||
local versionScript
|
local versionScript
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
import sys;
|
import sys;
|
||||||
|
|
||||||
dataSymbolsByAddress = {}
|
dataSymbolsByAddress = {}
|
||||||
|
dataSymbols = []
|
||||||
versionedDataSymbolsByName = {}
|
versionedDataSymbolsByName = {}
|
||||||
functionSymbolsByAddress = {}
|
functionSymbolsByAddress = {}
|
||||||
|
functionSymbols = []
|
||||||
versionedFunctionSymbolsByName = {}
|
versionedFunctionSymbolsByName = {}
|
||||||
|
|
||||||
for line in sys.stdin.readlines():
|
for line in sys.stdin.readlines():
|
||||||
@@ -15,7 +17,7 @@ for line in sys.stdin.readlines():
|
|||||||
(address, type, symbol) = line.split()
|
(address, type, symbol) = line.split()
|
||||||
|
|
||||||
# select interesting types of symbols
|
# select interesting types of symbols
|
||||||
if not type in 'BCDGRSTuVvWw':
|
if type not in 'BCDGRSTuVvWw':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# drop symbols from legacy compiler that contain a dot (those produce
|
# drop symbols from legacy compiler that contain a dot (those produce
|
||||||
@@ -27,21 +29,25 @@ for line in sys.stdin.readlines():
|
|||||||
if '@' in symbol:
|
if '@' in symbol:
|
||||||
versionedDataSymbolsByName[symbol] = address
|
versionedDataSymbolsByName[symbol] = address
|
||||||
else:
|
else:
|
||||||
dataSymbolsByAddress[address] = symbol
|
if type not in 'VW':
|
||||||
|
dataSymbolsByAddress[address] = symbol
|
||||||
|
dataSymbols.append(symbol)
|
||||||
else:
|
else:
|
||||||
if '@' in symbol:
|
if '@' in symbol:
|
||||||
versionedFunctionSymbolsByName[symbol] = address
|
versionedFunctionSymbolsByName[symbol] = address
|
||||||
else:
|
else:
|
||||||
functionSymbolsByAddress[address] = symbol
|
if type not in 'VW':
|
||||||
|
functionSymbolsByAddress[address] = symbol
|
||||||
|
functionSymbols.append(symbol)
|
||||||
|
|
||||||
# add data symbols
|
# add data symbols
|
||||||
for dataSymbol in sorted(dataSymbolsByAddress.values()):
|
for dataSymbol in sorted(dataSymbols):
|
||||||
print 'int %s;' % dataSymbol
|
print 'int %s;' % dataSymbol
|
||||||
|
|
||||||
print
|
print
|
||||||
|
|
||||||
# add function symbols
|
# add function symbols
|
||||||
for functionSymbol in sorted(functionSymbolsByAddress.values()):
|
for functionSymbol in sorted(functionSymbols):
|
||||||
print 'void %s() {}' % functionSymbol
|
print 'void %s() {}' % functionSymbol
|
||||||
|
|
||||||
print
|
print
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user