[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Unify C and asm symbols
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] Unify C and asm symbols |
Date: |
Tue, 5 Dec 2017 00:06:31 +0100 (CET) |
User-agent: |
Alpine 2.21 (LSU 202 2017-01-01) |
Hi,
On Mon, 4 Dec 2017, Michael Matz wrote:
> Oh, shiny! :) I like it. It also works on my linux kernel sources, and
> some other things, so it's a definite improvement. I'd say, apply.
Bleh, I wanted to ask one thing about the no_asmstack patch, the hunk:
@@ -390,7 +388,7 @@ ST_FUNC int find_elf_sym(Section *s, const char *name)
while (sym_index != 0) {
sym = &((ElfW(Sym) *)s->data)[sym_index];
name1 = (char *) s->link->data + sym->st_name;
- if (!strcmp(name, name1))
+ if (!strcmp(name, name1) && ELFW(ST_BIND)(sym->st_info) != STB_LOCAL)
return sym_index;
sym_index = ((int *)hs->data)[2 + nbuckets + sym_index];
}
My tests go through also without this hunk, so it's either an optimization
(but then it should be tested before the strcmp) or it's a left-over from
during development of your patch, or it's for a situation I don't know yet
(perhaps one of the multi-file ones?)
Conceptually it makes sense of course: STB_LOCAL symbols should be bound
via the Sym structure (i.e. within a file), not be used for providing
resolution for symbols from other files, but still I'm curious why you
needed it.
Ciao,
Michael.
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/03
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/04
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/04
- Re: [Tinycc-devel] Unify C and asm symbols,
Michael Matz <=
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/06
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/10
- Re: [Tinycc-devel] Unify C and asm symbols, Christian Jullien, 2017/12/11
- Re: [Tinycc-devel] Unify C and asm symbols, grischka, 2017/12/12
- Re: [Tinycc-devel] Unify C and asm symbols, Christian Jullien, 2017/12/12
- Re: [Tinycc-devel] Unify C and asm symbols, Michael Matz, 2017/12/15