public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Zlib
@ 2008-10-04 10:17 Greg Schafer
  2008-10-04 15:17 ` Zlib H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Schafer @ 2008-10-04 10:17 UTC (permalink / raw)
  To: binutils

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.

Thanks for any comments.

Regards
Greg

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Zlib
  2008-10-04 10:17 Zlib Greg Schafer
@ 2008-10-04 15:17 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2008-10-04 15:17 UTC (permalink / raw)
  To: Greg Schafer; +Cc: binutils

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-04 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-04 10:17 Zlib Greg Schafer
2008-10-04 15:17 ` Zlib H.J. Lu

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).