Skip to content

Commit 0582a32

Browse files
author
H. Peter Anvin
committed
Merge remote-tracking branch 'rygorous/master'
2 parents ffedb33 + 04f981e commit 0582a32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

output/outelf.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2692,7 +2692,11 @@ static void debug_typevalue(int32_t type)
26922692
stype = STT_NOTYPE;
26932693
break;
26942694
}
2695-
if (stype == STT_OBJECT && lastsym && !lastsym->type) {
2695+
/* Set type and size info on most recently seen symbol if we haven't set it already.
2696+
But avoid setting size info on object (data) symbols in absolute sections (which
2697+
is primarily structs); some environments get confused with non-zero-extent absolute
2698+
object symbols and end up showing them in backtraces for NULL fn pointer calls. */
2699+
if (stype == STT_OBJECT && lastsym && !lastsym->type && lastsym->section != XSHN_ABS) {
26962700
lastsym->size = ssize;
26972701
lastsym->type = stype;
26982702
}

0 commit comments

Comments
 (0)