DS: workaround for weak symbol issue
The bitcode file given to the instrumentation pass does not include certain weak symbols, in particular regcomp and regfree, which are required to be visible to the magic pass for state transfer to work correctly. This patch forces DS to make the calls using their actual symbol names (with leading underscore), thus resolving the issue, but this issue should really be solved in a cleaner and more generic way. Change-Id: Iebee4341cc30ddabcf7593afb5c49d41c0839863
This commit is contained in:
parent
3a3478dcea
commit
23369f9c9e
1 changed files with 7 additions and 0 deletions
|
@ -5,4 +5,11 @@ SRCS= main.c store.c
|
|||
DPADD+= ${LIBSYS}
|
||||
LDADD+= -lsys
|
||||
|
||||
# FIXME: workaround for the linker pass not seeing weak symbols. The
|
||||
# following symbols are essential for magic instrumentation, since they
|
||||
# perform memory de/allocation. For some reason, their weak versions are
|
||||
# not picked up by the linker in the first (instrumentation) pass. With
|
||||
# these definitions we force the first pass to include them.
|
||||
CPPFLAGS.store.c+= -Dregcomp=_regcomp -Dregfree=_regfree
|
||||
|
||||
.include <minix.service.mk>
|
||||
|
|
Loading…
Reference in a new issue