File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2638,11 +2638,16 @@ void LinkerDriver::compileBitcodeFiles(bool skipLinkedOutput) {
26382638 auto *obj = cast<ObjFile<ELFT>>(file.get ());
26392639 obj->parse (/* ignoreComdats=*/ true );
26402640
2641- for (typename ELFT::Sym elfSym : obj->template getGlobalELFSyms <ELFT>()) {
2642- StringRef elfSymName = check (elfSym.getName (obj->getStringTable ()));
2643- if (Symbol *sym = ctx.symtab ->find (elfSymName))
2644- if (sym->type == STT_NOTYPE)
2645- sym->type = elfSym.getType ();
2641+ // This is only needed for AArch64 PAuth to set correct key in AUTH GOT
2642+ // entry based on symbol type (STT_FUNC or not).
2643+ // TODO: check if PAuth is actually used.
2644+ if (ctx.arg .emachine == EM_AARCH64) {
2645+ for (typename ELFT::Sym elfSym : obj->template getGlobalELFSyms <ELFT>()) {
2646+ StringRef elfSymName = check (elfSym.getName (obj->getStringTable ()));
2647+ if (Symbol *sym = ctx.symtab ->find (elfSymName))
2648+ if (sym->type == STT_NOTYPE)
2649+ sym->type = elfSym.getType ();
2650+ }
26462651 }
26472652
26482653 // For defined symbols in non-relocatable output,
You can’t perform that action at this time.
0 commit comments