[pypy-commit] pypy default: Try to better support -fPIC compiler option in trackgcroot.
amauryfa
noreply at buildbot.pypy.org
Thu Apr 5 23:39:04 CEST 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r54211:10f1ff48184b
Date: 2012-04-05 23:38 +0200
http://bitbucket.org/pypy/pypy/changeset/10f1ff48184b/
Log: Try to better support -fPIC compiler option in trackgcroot.
diff --git a/pypy/translator/c/gcc/trackgcroot.py b/pypy/translator/c/gcc/trackgcroot.py
--- a/pypy/translator/c/gcc/trackgcroot.py
+++ b/pypy/translator/c/gcc/trackgcroot.py
@@ -847,6 +847,10 @@
if sources:
target, = sources
+ if target.endswith('@PLT'):
+ # In -fPIC mode, all functions calls have this suffix
+ target = target[:-4]
+
if target in self.FUNCTIONS_NOT_RETURNING:
return [InsnStop(target)]
if self.format == 'mingw32' and target == '__alloca':
@@ -1137,7 +1141,7 @@
r_jump_rel_label = re.compile(r"\tj\w+\s+"+"(\d+)f"+"\s*$")
r_unaryinsn_star= re.compile(r"\t[a-z]\w*\s+[*]("+OPERAND+")\s*$")
- r_jmptable_item = re.compile(r"\t.quad\t"+LABEL+"(-\"[A-Za-z0-9$]+\")?\s*$")
+ r_jmptable_item = re.compile(r"\t.(?:quad|long)\t"+LABEL+"(-\"[A-Za-z0-9$]+\"|-"+LABEL+")?\s*$")
r_jmptable_end = re.compile(r"\t.text|\t.section\s+.text|\t\.align|"+LABEL)
r_gcroot_marker = re.compile(r"\t/[*] GCROOT ("+LOCALVARFP+") [*]/")
More information about the pypy-commit
mailing list