public inbox for prelink@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <Tom_deVries@mentor.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: <prelink@sourceware.org>
Subject: Re: [PATCH] Add LINKOPTS to CCLINK and CXXLINK in testsuite/Makefile.am
Date: Tue, 07 May 2013 14:22:00 -0000	[thread overview]
Message-ID: <51890E03.2000009@mentor.com> (raw)
In-Reply-To: <20130507124043.GD28963@tucnak.redhat.com>

On 07/05/13 14:40, Jakub Jelinek wrote:
> On Tue, May 07, 2013 at 02:33:52PM +0200, Tom de Vries wrote:
>> this patch allows me to run all the tests successfully on x86_64 with
>> LINKOPTS="-Wl,--no-as-needed" set in the environment.
> 
> That shouldn't be needed anymore, are you using latest SVN prelink?

Jakub,

I'm using r205, dated 2013-05-03.

The failures I see with that version are:
...
FAIL: layout1.sh
FAIL: layout2.sh
FAIL: tls5.sh
FAIL: tls6.sh
FAIL: cxx1.sh
FAIL: cxx2.sh
FAIL: cxx3.sh
FAIL: quick1.sh
FAIL: quick2.sh
FAIL: cycle1.sh
FAIL: cycle2.sh
...

Running tls5 by hand gives:
...
$ ../../src/testsuite/tls5.sh  ; echo $?
../src/prelink: tls5lib3.so does not have .gnu.prelink_undo section
4
...

Without --no-as-needed, tls5lib1.so is not dependent on tls5lib3.so, so the
prelink command ignores it:
...
../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=.
--dynamic-linker=./ld-linux-x86-64.so.2 -vm ./tls5
Laying out 2 libraries in virtual address space 0000003000000000-0000004000000000
Assigned virtual address space slots for libraries:
./ld-linux-x86-64.so.2
0000003000000000-00000030002242c8
./tls5lib1.so
0000003000400000-0000003000602088
./tls5lib2.so
0000003000800000-0000003000a01030
./libc.so.6
0000003000c00000-0000003000fbe4d8
Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5lib2.so
Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5lib1.so
Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5
...
and the undo of the prelink of tls5lib3.so fails.

Setting LINKOPTS with --no-as-needed allows the test to pass:
...
$ LINKOPTS="-Wl,--no-as-needed" ../../src/testsuite/tls5.sh  ; echo $?
0
...

> Before those testsuite changes, one could just do
> make check CC='gcc -Wl,--no-as-needed' CXX='g++ -Wl,--no-as-needed'

That works also for me.

I used LINKOPTS because I read functions.sh and saw how it's used there (CC
includes LINKOPTS, CCLINK includes CC which includes LINKOPTS). It made sense to
me to use LINKOPTS because --no-as-needed it is a link opt, and we need to pass
it only once (instead of in both CC and CXX).

Thanks,
- Tom

  reply	other threads:[~2013-05-07 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 12:34 Tom de Vries
2013-05-07 12:40 ` Jakub Jelinek
2013-05-07 14:22   ` Tom de Vries [this message]
2013-05-07 14:28     ` Jakub Jelinek
2013-05-07 14:42       ` Tom de Vries
2013-05-07 14:47         ` Jakub Jelinek
2013-05-07 17:10           ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51890E03.2000009@mentor.com \
    --to=tom_devries@mentor.com \
    --cc=jakub@redhat.com \
    --cc=prelink@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).