While testing if it's working, I found out that if I have a script with
those lines inside SECTIONS{
lixo = lixo_1;
TEMPORARY( lixo_1 = 0x1);
}
I have as result:
make ok;readelf -a ok|grep lixo
cc -Wl,-T -Wl,script -Wl,--deftmp -Wl,lixo1=0x19 -Wl,--deftmp
-Wl,lixo2=0x29 ok.c -o ok
49: 00000001 0 NOTYPE GLOBAL DEFAULT ABS lixo
59: 00000000 0 NOTYPE GLOBAL DEFAULT UND lixo_1
As you can see, lixo_1 ends up as undefined.
The parser accept the variable, but in the tree used to construct the
sentence lixo = lixo_1; lixo_1 is not defined yet. Why the parser accept
a variable that wasn't defined yet?