https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #37 from Sergei Trofimovich ---
The patch also fixes this old bug:
https://bugzilla.redhat.com/show_bug.cgi?id=33354
Despite being marked as fixed it fails on modern toolchain with slight
overflow.
Address of local constant was
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #35 from Sergei Trofimovich ---
Created attachment 37180
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37180=edit
0001-ia64-don-t-use-dynamic-relocations-for-local-symbols.patch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #36 from Sergei Trofimovich ---
Tested the patch on top of gcc-5.3.0 / glibc-2.22-r1.
Relocation in rtld.os is R_IA64_GPREL64I and is just an immediate offset in
ld.so:
# objdump -r -d elf/rtld.os | grep -C4 rtld_local+0x38
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #34 from Sergei Trofimovich ---
Wrote more details on how exactly things were broken:
http://trofi.github.io/posts/189-glibc-on-ia64-or-how-relocations-bootstrap.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #32 from Sergei Trofimovich ---
(In reply to Andreas Schwab from comment #31)
> @ltoffx on symbol+addend doesn't make any sense. This computes an offset
> into the GOT, so any addend needs to be added _after_ loading the actual
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #33 from Sergei Trofimovich ---
Sent glibc workaround for review as:
https://sourceware.org/ml/libc-alpha/2015-12/msg00556.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #29 from Andreas Schwab ---
'_rtld_local#+15032385536' is just a hint that is passed through to the linker
in the addend of the R_IA64_LDXMOV relocation for the insn. That tells the
linker the addend of the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #30 from Sergei Trofimovich ---
Aha, got it.
I've factored out GNU_HASH section setup crash into separate
very simple function:
void __attribute__ ((unused, noinline))
do_it_again (struct link_map *l, ElfW(Dyn) *dyn)
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #31 from Andreas Schwab ---
@ltoffx on symbol+addend doesn't make any sense. This computes an offset into
the GOT, so any addend needs to be added _after_ loading the actual symbol
address from the GOT.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Sergei Trofimovich changed:
What|Removed |Added
CC||slyfox at inbox dot ru
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Eric Botcazou ebotcazou at gcc dot gnu.org changed:
What|Removed |Added
Attachment #33349|0 |1
is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Eric Botcazou ebotcazou at gcc dot gnu.org changed:
What|Removed |Added
Status|WAITING |NEW
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #22 from Richard Biener rguenth at gcc dot gnu.org ---
(In reply to Mike Frysinger from comment #18)
thanks for your help Eric. new bisection shows r187042 as a possible
culprit. feel free to de-cc yourself :).
Richard: any
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #23 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
Created attachment 33349
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33349action=edit
Reduced testcase
To be compiled at -O1.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Eric Botcazou ebotcazou at gcc dot gnu.org changed:
What|Removed |Added
Status|NEW |WAITING
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #25 from Mike Frysinger vapier at gentoo dot org ---
here's the series of link commands:
gcc -nostdlib -nostartfiles -r -o elf/librtld.os \
'-Wl,-(' /home/vapier/glibc/build/elf/dl-allobjs.os elf/rtld-libc.a -lgcc \
'-Wl,-)'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Mike Frysinger vapier at gentoo dot org changed:
What|Removed |Added
CC||rguenth at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #19 from Mike Frysinger vapier at gentoo dot org ---
Created attachment 33340
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33340action=edit
rtld.s generated -- passing w/r187038
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #20 from Mike Frysinger vapier at gentoo dot org ---
Created attachment 33341
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33341action=edit
rtld.s generated -- failing w/r187042
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Eric Botcazou ebotcazou at gcc dot gnu.org changed:
What|Removed |Added
Status|WAITING |NEW
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Eric Botcazou ebotcazou at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #13 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
i've bisected things back to r188118. before that commit, gcc compiles
rtld.c fine and produces a working ldso. starting at that commit, we get
segfaults.
In fact r188118
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #14 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to Eric Botcazou from comment #12)
i've bisected things back to r188118. before that commit, gcc compiles
rtld.c fine and produces a working ldso. starting at that
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #15 from Mike Frysinger vapier at gentoo dot org ---
(In reply to Andrew Pinski from comment #11)
i tried 4.8.3 w/those two patches applied but still see the crash :(
(In reply to Eric Botcazou from comment #12)
correct, gcc-4.6.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #16 from Mike Frysinger vapier at gentoo dot org ---
Created attachment 33321
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33321action=edit
rtld.i preprocessed source
the preprocessed output is the same between 4.7.4 4.8.3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #17 from Mike Frysinger vapier at gentoo dot org ---
(In reply to Eric Botcazou from comment #13)
fwiw, i took latest 4.8 branch and reverted that change, and ldso works
i'll test r188009 and related too though
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Mike Frysinger vapier at gentoo dot org changed:
What|Removed |Added
CC||ebotcazou at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #11 from Andrew Pinski pinskia at gcc dot gnu.org ---
This sounds like the same bug which I fixed with the set of patches at
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00932.html .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #9 from Mike Frysinger vapier at gentoo dot org ---
i've verified that 4.8.0 4.9.1 fail as well :/
binutils 2.24 doesn't help
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #6 from devurandom at gmx dot net ---
Did anyone figure out what's going on? Did the gdb log bring new insights?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #7 from Mike Frysinger vapier at gentoo dot org ---
it's beyond my (ia64 beginners) experience to track this down further
i can certainly make available ssh access to interested devs ... it's a fast
system on a fast edu connection
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #8 from devurandom at gmx dot net ---
(In reply to Mike Frysinger from comment #7)
it's beyond my (ia64 beginners) experience to track this down further
i can certainly make available ssh access to interested devs ... it's a fast
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Mike Frysinger vapier at gentoo dot org changed:
What|Removed |Added
CC||vapier at gentoo
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
devurandom at gmx dot net changed:
What|Removed |Added
Target||ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #4 from Andreas Schwab sch...@linux-m68k.org ---
How about showing the previous ~20 insns here.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #5 from Mike Frysinger vapier at gentoo dot org ---
Created attachment 32385
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32385action=edit
gdb session
here's the trace from the first insn where dyn is pointing to DT_GNU_HASH.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #1 from devurandom at gmx dot net ---
Created attachment 32310
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32310action=edit
emerge --info
37 matches
Mail list logo