public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Greg Schafer <gschafer@zip.com.au>
Cc: binutils@sourceware.org
Subject: Re: Zlib
Date: Sat, 04 Oct 2008 15:17:00 -0000	[thread overview]
Message-ID: <20081004151632.GA23097@lucon.org> (raw)
In-Reply-To: <20081004101712.GA18025@eyo32.local>

On Sat, Oct 04, 2008 at 08:17:12PM +1000, Greg Schafer wrote:
> Hi,
> 
> Testing latest release candidate and I have 3 related issues:
> 
> 1) If zlib is not available at Binutils build time, there are 2 failures in
> the testsuite:
> 
> FAIL: objdump -W
> FAIL: readelf -wa (compressed)
> 
> Surely the testsuite should skip these tests in this scenario? I'll file a
> PR unless someone can explain why this is acceptable.
> 
> 2) When Zlib *is* available, shared Zlib is now linked into every single
> Binutils binary and the shared libbfd. The initial proposal was for
> addr2line, objdump, readelf. Why do the remaining binaries (ar, as, c++filt,
> gprof, ld, nm, objcopy, ranlib, size, strings, strip) all need to be linked
> against zlib?
> 
> 3) My understanding is that Zlib support was added because:
> 
>   "The gold linker can emit compressed sections. There is a gold flag to
>    enable compressed debug sections."
> 
> So, because gold can enable compressed debug sections, I'm now forced to
> have all my Binutils linked against Zlib, even if I'm not building gold?
> This feels kinda wrong.
> 
> I believe there should be a user friendly way to disable linking against
> zlib.

1. Check if linker supports --as-needed/--no-as-needed.
2. Use --as-needed -lz --no-as-needed if possible.


H.J.

      reply	other threads:[~2008-10-04 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-04 10:17 Zlib Greg Schafer
2008-10-04 15:17 ` H.J. Lu [this message]

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=20081004151632.GA23097@lucon.org \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gschafer@zip.com.au \
    /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).