aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-25 13:28:56 +0100
committerlemon <lsof@mailbox.org>2025-12-25 13:28:56 +0100
commita6c2f8a9177eeae64b83e4aeafe46dbe310b3861 (patch)
treed7d4ad2a189170a5ca56a9b46f3571fb12d72bb4 /c/c.c
parent882ea80770120e4f94e98e46ef824cafc9ccfe1f (diff)
avoid GOT relocations in unnecessary instances
Also change xcon to have a flagset for symbols (whether it's a function, locally defined; later: thread local, etc).
Diffstat (limited to 'c/c.c')
-rw-r--r--c/c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index e070924..8a06272 100644
--- a/c/c.c
+++ b/c/c.c
@@ -2867,7 +2867,7 @@ expraddr(struct function *fn, const struct expr *ex)
uchar *p = objout.code ? objout.textbegin + off : objout.rodata.p + off;
memcpy(p, fn->name, typearrlen(decl->ty)-1);
}
- return mksymref(decl->sym, decl->ty.t == TYFUNC);
+ return mksymref(decl->sym, (SFUNC & -(decl->ty.t == TYFUNC)) | (SLOCAL & -(decl->scls == SCSTATIC || decl->isdef)));
default:
assert(0);
}