[Bug lto/69271] LTO drops weak binding from aliases

2016-05-30 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 --- Comment #8 from Jan Hubicka --- Ok, compiling: int bar = 0; extern int bar_alias __attribute__((weak, alias("bar"))); main() { printf ("%i %i\n",bar,bar_alias); } as a static library leads to no dynamic relocations, but compiling as

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-15 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 --- Comment #4 from Jan Hubicka --- The optimization was intentional - dropping the weak bit makes GCC to optimize the references to symbol better (knowing it won't be NULL because the definition is provided). I wonder how this break glibc. What

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-15 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 --- Comment #5 from nsz at gcc dot gnu.org --- copy pasting from http://www.openwall.com/lists/musl/2016/01/13/2 (this is musl libc, but glibc has the same issue) lto breaks symbol binding for environ, _environ, ___environ. (they should be weak,

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-15 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-15 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 --- Comment #6 from nsz at gcc dot gnu.org --- to complete the example here is a test application: #include #include extern char **environ; int main() { printf(": %p, environ: %p, *environ: %p\n", , environ, *environ);

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-15 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 Rich Felker changed: What|Removed |Added CC||bugdal at aerifal dot cx --- Comment #7

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-14 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 nsz at gcc dot gnu.org changed: What|Removed |Added Version|6.0 |5.3.1 --- Comment #1 from nsz

[Bug lto/69271] LTO drops weak binding from aliases

2016-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 Richard Biener changed: What|Removed |Added Keywords||lto, wrong-code CC|