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.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to