The following happens:
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b10pre) Gecko/20110121
Build Identifier: 20110128084136
After the fix for bug 628988 I get this:
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz'
make: *** [test.so] Avbruten (SIGABRT)
make: *** Tar bort filen "test.so"
make: Lämnar katalogen
make: *** [libs] Fel 2
Using 64-bit Ubuntu 10.10 (gcc-4.4.real (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5)
with the Gold Linker (link (GNU coreutils) 8.5.) Disabling elfhack works,
And the answer from mozilla is the following:
Mike Hommey [:glandium] 2011-01-28 08:52:17 PST
Could you attach your test.so ?
[reply] [-] Comment 2 Bengt-Erik Soderstrom 2011-01-28 10:12:00 PST
(In reply to comment #1)
> Could you attach your test.so ?
Sorry, I don't now how. test.so gets deleted...Please advice
[reply] [-] Comment 3 Mike Hommey [:glandium] 2011-01-28 10:20:30 PST
(In reply to comment #2)
> (In reply to comment #1)
> > Could you attach your test.so ?
> Sorry, I don't now how. test.so gets deleted...Please advice
Run the gcc command (the one that make displays) by hand.
[reply] [-] Comment 4 Bengt-Erik Soderstrom 2011-01-28 16:40:11 PST
Created attachment 508041 [details]
OK, attached test.so as requested
[reply] [-] Comment 5 Mike Hommey [:glandium] 2011-01-28 23:49:46 PST
Okay, so this is due to the GNU_RELRO section being weirdly defined. Its end is
not page aligned as it is supposed to be (and elfhack expects it to be), and it
ends in the middle of the .got.plt section.
[reply] [-] Comment 6 Bengt-Erik Soderstrom 2011-01-29 07:36:22 PST
So, for the time being we make it without elfhack (ac_add_options
Which version of gold are you using? You gave the version number of the coreutils, but that is not the package that gold is in. What does ld --version report? There are fixes for this sort of thing in the GNU binutils 2.21 release.
It looks like Ubuntu did not supply the latest version, although I installed it only some week ago.. this is what I have:
GNU gold (GNU Binutils for Ubuntu 2.20.51-system.20100908) 1.10
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
I'm pretty sure you need at least 20101117 for this to work, and presumably the 2.21 release would be better.
I'll mark this as fixed, but please feel free to reopen this if the problem still occurs with a more recent build.
(In reply to comment #3)
> I'm pretty sure you need at least 20101117 for this to work, and presumably the
> 2.21 release would be better.
> I'll mark this as fixed, but please feel free to reopen this if the problem
> still occurs with a more recent build.
After compiling and installing binutils 2.21 I can confirm that it now works OK,
both with ld and with the Gold. Thanks for your help