[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] forward asm symbols vs static
From: |
Michael Matz |
Subject: |
[Tinycc-devel] forward asm symbols vs static |
Date: |
Thu, 16 Nov 2017 13:42:23 +0100 (CET) |
User-agent: |
Alpine 2.21 (LSU 202 2017-01-01) |
Hello grischka,
I had to revert a small part of your da8c62 commit ("various stuff"):
tccasm.c:
- keep forward asm labels static, otherwise they will endup
in dynsym eventually.
A symbol which stays undefined until the end is implicitely STB_GLOBAL,
even without a .globl directive. I've added a testcase to that effect.
Before just reverting the hunk I've tried to move it somewhere else in
order not to lose the effect mentioned above.
But in the end I wasn't really successful in constructing a testcase where
such symbol ends up in dynsym when it shouldn't. E.g. local labels (the
numeric ones) are always already constructed as VT_STATIC. And normal
labels are also created VT_STATIC, except if they already were associated
with a .globl directive. So I don't really see how the problem above
could have happened.
To recollect, give the following assembler snippet:
jmp 1f
local:
call local
call undefined
call global
.globl global
global:
1: nop
the symbols L..1 and local need to be STB_LOCAL, while undefined and
global need to be STB_GLOBAL.
So, if you have a testcase or remember the situation that you tried to
fix, can you tell me which one it was? :)
Ciao,
Michael.
- [Tinycc-devel] forward asm symbols vs static,
Michael Matz <=
- Message not available
- Message not available
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/17
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/19
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/19
- Re: [Tinycc-devel] forward asm symbols vs static, grischka, 2017/11/19
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/20
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/22
- Re: [Tinycc-devel] forward asm symbols vs static, avih, 2017/11/23
- Re: [Tinycc-devel] forward asm symbols vs static, Michael Matz, 2017/11/23
- Re: [Tinycc-devel] forward asm symbols vs static, avih, 2017/11/23