From a6c2f8a9177eeae64b83e4aeafe46dbe310b3861 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 25 Dec 2025 13:28:56 +0100 Subject: 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). --- x86_64/isel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86_64/isel.c') diff --git a/x86_64/isel.c b/x86_64/isel.c index 9c99608..40d8db4 100644 --- a/x86_64/isel.c +++ b/x86_64/isel.c @@ -305,7 +305,7 @@ fuseaddr(union ref *r, struct block *blk, int *curi) if (r->t != RSTACK && r->t != RTMP) return 0; if (!aadd(&addr, blk, curi, *r)) return 0; - if (isaddrcon(addr.base,0) && (ccopt.pic || (ccopt.pie && addr.index.bits) || conht[addr.base.i].isfunc)) { + if (isaddrcon(addr.base,0) && (ccopt.pic || (ccopt.pie && addr.index.bits) || (conht[addr.base.i].flag & SFUNC))) { /* pic needs to load from GOT */ /* pie cannot encode RIP-relative address with index register */ /* first load symbol address into a temp register */ -- cgit v1.2.3