Fix --gc-sections for C++ MIPS ELF

Richard Sandiford rsandifo@nildram.co.uk
Tue Dec 4 10:08:00 GMT 2007


Jakub Jelinek <jakub@redhat.com> writes:
> On Sun, Dec 02, 2007 at 08:15:15PM +0000, Richard Sandiford wrote:
>> I tested the changes by running the C++ and libstdc++-v3 testsuites
>> on x86_64-linux-gnu and mipsisa64-elf with -Wl,--gc-sections.
>> The C++ PCH tests failed, but the results were otherwise identical
>> to those without -Wl,--gc-sections.  There were also no regressions
>> in the binutils, gas and ld testsuites for x86_64-linux-gnu,
>> mipsisa64-elf and mips64-linux-gnu.
>
> Another desirable test would be to build libgcj and glibc (as examples of
> really huge .eh_frame, including hand written .eh_frame, gas generated
> .cfi_* stuff and gcc generated stuff) on x86_64-linux, i686-linux, ppc-linux
> at least and comparing the resulting .eh_frame between unpatched and patched
> ld.

OK.  I don't have access to ppc-linux, but I tried it on the other two.
Specifically, with and without the patches, I:

  - built binutils from scratch and installed it into fixed location 1
  - ran a full gcc bootstrap and regression test from fixed location 2
    and installed into fixed location 3.  I did this with fixed location 1
    at the head of the path, and with --with-{as,ld} pointing at the
    assembler and linker in fixed location 1.
  - built glibc with fixed location 1 and fixed location 3 at the head
    of the path.
  - moved fixed location 3 and the glibc build directory away for later
    comparison.

I double-checked that the right binutils and gccs were being used
in each step.

The two libc.sos were identical.  The libgcj.sos differed only in
debugging information, due to things like different random seeds;
the stripped versions were also identical.  FWIW, libstdc++-v3
(which is built with -Wl,--gc-sections) stayed the same too.

The gcc regression-test results were also the same for both builds.
I extended the -Wl,--gc-sections testing on i686-pc-linux-gnu
(adding to the original x86_64-linux-gnu and mipsisa64-elf).

The patched binutils included the eighth patch that I just posted.

Richard



More information about the Binutils mailing list