This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold] Merging string literals with bigger alignment
- From: Alan Modra <amodra at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Alexander Ivchenko <aivchenk at gmail dot com>, binutils <binutils at sourceware dot org>
- Date: Wed, 1 May 2013 11:55:27 +0930
- Subject: Re: [gold] Merging string literals with bigger alignment
- References: <CAHACq4odyq1ok_SWBFNUDreq8=b-4MMqp3DXJY03viF2-HUe8w at mail dot gmail dot com> <CACysShj2TB84vkATNQhDVYx7QURtx29Qpb5t+i_i2OP6R-zgZQ at mail dot gmail dot com> <CAHACq4q4=bd1gB9LEBJRwOnqDTYQxZ_Z=BKN++M0KSPqDdGJtg at mail dot gmail dot com> <CACysShjX+kaq8CAcCWDMcvChGrUPYNz4XQGYbk+okV2baGPfJQ at mail dot gmail dot com> <CAHACq4rN=nj5wX5AJYwKSbqnDfbMPC=p9CvGJR-y-JjKi=0gqw at mail dot gmail dot com> <CAKOQZ8y7DMUSWh5dozvxBD1a8uW981K+Gwn95JTqcGFkAHdVOg at mail dot gmail dot com> <CACysShhF+sh1vebktXwoc6epBJ8FQTMTjXRURm7nJT9MfjUvLA at mail dot gmail dot com> <CAHACq4p4fqA2YiJLPsxoP=+KMy-9H+r2Jyp_WXhzxxcDgxa0aQ at mail dot gmail dot com> <CACysShiw_kcnug9u8ShzS-k0qQVdrz3wk5kB2Aqh=cZmaQrPhA at mail dot gmail dot com> <CAHACq4q7CReFbYaeK+APLLhi+oKxBcv4d-2o4wjvkxRpx=Uj_A at mail dot gmail dot com>
On Mon, Apr 29, 2013 at 10:16:17AM -0700, Cary Coutant wrote:
> > There was no feedback from Ian for this patch: I rebased it and did
> > the changes that you mentioned.
> > As a "fully fledged"(c) gold maintainer (congratulations btw :) )
> > could you please take a look again?
> >
> > All tests pass on x86-64-gnu-linux.
They don't for me. I see
`echo g++ -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -o basic_static_test | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -Bgcctestdir/ -static basic_test.o
collect2: ld terminated with signal 6 [Aborted]
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
make[5]: *** [basic_static_test] Error 1
On powerpc64 with a different compiler:
gold/stringpool.cc:220:23: error: âoffsetâ may be used uninitialized in this function [-Werror=uninitialized]
cc1plus: all warnings being treated as errors
and indeed the code is wrong.
Fixing new_key_offset() is easy, but the gold bootstrap test fails
(cd gcctestdir2 && ln -s ../ld1 ld)
g++ -m64 -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=ld2 -g -O2 -Bgcctestdir2/ -Wl,--build-id=tree -Wl,--build-id-chunk-size-for-treehash=12345 -Wl,--build-id-min-file-size-for-treehash=0 -o ld2 main.o powerpc.o libgold.a ../libiberty/libiberty.a -ldl -lz
gcctestdir2/ld: error: cannot find main.o
gcctestdir2/ld: error: cannot find powerpc.o
gcctestdir2/ld: error: cannot find libgold.a
gcctestdir2/ld: error: cannot find ../libiberty/libiberty.a
.zdebug_line: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
> > If ok, could someone commit please? I don't have commit access.
>
> Committed on your behalf. Thanks!
>
> -cary
--
Alan Modra
Australia Development Lab, IBM