Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36496 - Fix IA-64 -pie support
Summary: Fix IA-64 -pie support
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: IA64 All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://sources.redhat.com/ml/binutils...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-25 16:33 UTC by solar (RETIRED)
Modified: 2004-03-19 20:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2003-12-25 16:33:42 UTC
The patch was intruduced by Jackub and approved by Richard Henderson
Please add if patches clean or is not in a branch update.

On another note can we setup a toolchain@ alias vs just a gcc-porting@ I would like to be added to this.
Comment 1 Duraid Madina 2003-12-27 18:22:30 UTC
on the request of someone from #gentoo-ia64 :

<solar> if current could you please add a note to http://bugs.gentoo.org/show_bug.cgi?id=36496 (Fix IA-64 -pie support)
<solar> just saying that -pie -fPIE seems to be there but the Scrt1.S from your system seems to never of been compiled.

(attempting to build a trivial C program gives:

(%:~/t)- gcc -fpie -pie test.c
/usr/lib/gcc-lib/ia64-unknown-linux-gnu/3.3.2/../../../../ia64-unknown-linux-gnu/bin/ld: cannot open Scrt1.o: No such file or directory
collect2: ld returned 1 exit status

)
Comment 2 solar (RETIRED) gentoo-dev 2004-01-23 11:46:03 UTC
http://sources.redhat.com/ml/binutils/2004-01/msg00356.html

From: 	Jakub Jelinek <jakub@redhat.com>
Reply-To: 	Jakub Jelinek <jakub@redhat.com>
To: 	binutils@sources.redhat.com
Subject: 	[PATCH] Fix -pie on IA-64
Date: 	Fri, 23 Jan 2004 11:33:33 +0100	
Hi!

PIEs don't work at all in binutils CVS since November.  The problem is
that linker script puts RELA section in wrong order:
.rela.dyn
.rela.IA_64.pltoff
.rela.opd
while it of course should be
.rela.dyn (where .rela.opd is included here)
.rela.IA_64.pltoff
On IA-64, DT_RELA..DT_RELA+DT_RELASZ covers all allocated .rela sections
(correct), but if .rela.IA_64.pltoff is in the middle (and thus
DT_JMPREL..DT_JMPREL+DT_PLTRELSZ), the dynamic linker is certainly not
able to cope with it (and relocates .rela.IA_64.pltoff relocs twice,
first time as in non-lazy binding and second time adds l_addr to it
as in preparation for lazy binding).
Ok to commit?

2004-01-23  Jakub Jelinek  <jakub@redhat.com>

        * emulparams/elf64_ia64.sh: Put .rela.opd into
        OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
Comment 3 solar (RETIRED) gentoo-dev 2004-03-19 20:26:25 UTC
IA-64 seems to have many other shared object handing problems. And nobody seems to want wants to jump on this.. 
Changing resolution to UPSTREAM