Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] binutils 2.15?
@ 2004-06-13 13:39 Joel Soete
       [not found] ` <200406140409.i5E49HYi003897@hiauly1.hia.nrc.ca>
  2004-06-14  4:09 ` John David Anglin
  0 siblings, 2 replies; 6+ messages in thread
From: Joel Soete @ 2004-06-13 13:39 UTC (permalink / raw)
  To: parisc-linux

Hi all,

I read that now many arch try to update their toolchain to a new release;=

I so try to rebuild toolchain starting from binutils-2.15 (.0.91... from
ftp.kernel.org)
it build well but when I launch to rebuild gcc with those new binutil con=
figure
crashes immediately with:
"/usr/bin/ld: .got section not immediately after .plt section"

What do I mess and forget?

TIA,
    Joel


-------------------------------------------------------------------------=
---------------
Tiscali ADSL, 27,50 =80/mois...pendant 6 mois. 
La meilleure offre du march=E9 !
http://reg.tiscali.be/default.asp?lg=3Dfr




_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [parisc-linux] binutils 2.15?
       [not found] ` <200406140409.i5E49HYi003897@hiauly1.hia.nrc.ca>
@ 2004-06-14  3:25   ` Jakub Jelinek
       [not found]   ` <20040614032519.GS5191@sunsite.ms.mff.cuni.cz>
  1 sibling, 0 replies; 6+ messages in thread
From: Jakub Jelinek @ 2004-06-14  3:25 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, parisc-linux

On Mon, Jun 14, 2004 at 12:09:16AM -0400, John David Anglin wrote:
> > I read that now many arch try to update their toolchain to a new release;
> > I so try to rebuild toolchain starting from binutils-2.15 (.0.91... from
> > ftp.kernel.org)
> > it build well but when I launch to rebuild gcc with those new binutil configure
> > crashes immediately with:
> > "/usr/bin/ld: .got section not immediately after .plt section"
> 
> The following change appears to have introduced this problem:

First of all, can you explain why hppa needs .got after .plt?

	Jakub
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [parisc-linux] binutils 2.15?
  2004-06-13 13:39 [parisc-linux] binutils 2.15? Joel Soete
       [not found] ` <200406140409.i5E49HYi003897@hiauly1.hia.nrc.ca>
@ 2004-06-14  4:09 ` John David Anglin
  1 sibling, 0 replies; 6+ messages in thread
From: John David Anglin @ 2004-06-14  4:09 UTC (permalink / raw)
  To: Joel Soete; +Cc: jakub, binutils, parisc-linux

> I read that now many arch try to update their toolchain to a new release;
> I so try to rebuild toolchain starting from binutils-2.15 (.0.91... from
> ftp.kernel.org)
> it build well but when I launch to rebuild gcc with those new binutil configure
> crashes immediately with:
> "/usr/bin/ld: .got section not immediately after .plt section"

The following change appears to have introduced this problem:

CVSROOT:        /cvs/src
Module name:    src
Changes by:     jakub@sourceware.org    2004-05-11 17:08:32

Modified files:
	bfd            : ChangeLog 
	include        : ChangeLog 
	binutils       : ChangeLog 

Log message:
	bfd/
	* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
	into .dynsym if elf_section_data (sec)->dynindx <= 0.
	Adjust counting of last_local.
	(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
	other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
	created by the linker nor !SHF_ALLOC.
										
	* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.  Set sh_entsize for .got section in addition
	to .got.plt.
	...

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [parisc-linux] binutils 2.15?
       [not found]   ` <20040614032519.GS5191@sunsite.ms.mff.cuni.cz>
@ 2004-06-14 12:08     ` Alan Modra
       [not found]     ` <20040614120820.GG28716@bubble.modra.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Modra @ 2004-06-14 12:08 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: binutils, parisc-linux

On Mon, Jun 14, 2004 at 05:25:20AM +0200, Jakub Jelinek wrote:
> First of all, can you explain why hppa needs .got after .plt?

There's a lazy linking stub inserted at the end of the .plt section that
loads the .got address by

  b,l	1b,%r20
  depi	0,31,2,%r20

ie. it depends on .got immediately following these instructions.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [parisc-linux] binutils 2.15?
       [not found]     ` <20040614120820.GG28716@bubble.modra.org>
@ 2004-06-21 15:18       ` Carlos O'Donell
  0 siblings, 0 replies; 6+ messages in thread
From: Carlos O'Donell @ 2004-06-21 15:18 UTC (permalink / raw)
  To: Alan Modra, Jakub Jelinek, John David Anglin, parisc-linux,
	binutils

> There's a lazy linking stub inserted at the end of the .plt section that
> loads the .got address by
> 
>   b,l	1b,%r20
>   depi	0,31,2,%r20
> 
> ie. it depends on .got immediately following these instructions.

My apologies for a tardy reply.

We don't *have* to depend on the .got immediately following these
instructions. Technically we look for a signature at the end of the PLT.
The code in glibc looks beyond the last relocation in the following 
equation:

ptr = reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB

And if it finds the signature at ptr[-2] and ptr[-1], then it
acknowledges that as the PLT stub. It then by proxy knows that the GOT
should be at ptr[0], but it doesn't have to rely strictly on this, I'm
more than willing to add more code to glibc to remove this restriction.

I just don't really know how other arches find the GOT at this early 
stage in ld.so's startup (e.g. elf_machine_runtime_setup()).

The only reason we use the GOT here is because we want to identify the
shared object by storing a pointer to the DSO link_map into GOT[1]. 
Which to tell you the truth, I'm sure has to do with something in 
binutils that I currently don't understand.

I'm slowly reviewing the binutils hppa code because I'd like to clean it
up / understand it enough to add TLS.

Jakub, I hope this helps, if someone has an idea then I would be more
than happy to implement the change and test the resulting
binutils/glibc.

Cheers,
Carlos.

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [parisc-linux] binutils 2.15?
       [not found] <20040621151800.GC16360@baldric.uwo.ca>
@ 2004-06-28  3:25 ` John David Anglin
  0 siblings, 0 replies; 6+ messages in thread
From: John David Anglin @ 2004-06-28  3:25 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: jakub, binutils, amodra, parisc-linux

> > There's a lazy linking stub inserted at the end of the .plt section that
> > loads the .got address by
> > 
> >   b,l	1b,%r20
> >   depi	0,31,2,%r20
> > 
> > ie. it depends on .got immediately following these instructions.
> 
> My apologies for a tardy reply.
> 
> We don't *have* to depend on the .got immediately following these
> instructions. Technically we look for a signature at the end of the PLT.
> The code in glibc looks beyond the last relocation in the following 
> equation:
> 
> ptr = reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB
> 
> And if it finds the signature at ptr[-2] and ptr[-1], then it
> acknowledges that as the PLT stub. It then by proxy knows that the GOT
> should be at ptr[0], but it doesn't have to rely strictly on this, I'm
> more than willing to add more code to glibc to remove this restriction.

>>From my perspective, we need binutils to work with existing versions
of glibc.  While Carlos' offer to work on removing the restriction is
commendable, the details of this haven't been worked out or tested.
I believe that we need GOT after PLT until the glibc changes are
available and widely distributed.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-28  3:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-13 13:39 [parisc-linux] binutils 2.15? Joel Soete
     [not found] ` <200406140409.i5E49HYi003897@hiauly1.hia.nrc.ca>
2004-06-14  3:25   ` Jakub Jelinek
     [not found]   ` <20040614032519.GS5191@sunsite.ms.mff.cuni.cz>
2004-06-14 12:08     ` Alan Modra
     [not found]     ` <20040614120820.GG28716@bubble.modra.org>
2004-06-21 15:18       ` Carlos O'Donell
2004-06-14  4:09 ` John David Anglin
     [not found] <20040621151800.GC16360@baldric.uwo.ca>
2004-06-28  3:25 ` John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox