public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* -z combreloc
@ 2001-10-13 10:47 Jack Howarth
  2001-10-13 12:25 ` Andrew Cagney
  2001-10-13 13:20 ` Jakub Jelinek
  0 siblings, 2 replies; 14+ messages in thread
From: Jack Howarth @ 2001-10-13 10:47 UTC (permalink / raw)
  To: binutils

Hello,
   Debian is preparing to enable -z combreloc
in their binutils 2.11.92.0.5 packages. On Debian
ppc sid the -z combreloc enabled binutils builds
fine and passes all of make check without problems.
This is enabling -z combreloc with the simple patch...

diff -urN binutils-2.11.92.0.5/ld/ldmain.c binutils-2.11.92.0.5.new/ld/ldmain.c
--- binutils-2.11.92.0.5/ld/ldmain.c	Mon Oct  1 18:25:25 2001
+++ binutils-2.11.92.0.5.new/ld/ldmain.c	Sat Oct 13 11:04:23 2001
@@ -249,7 +249,7 @@
   link_info.flags = (bfd_vma) 0;
   link_info.flags_1 = (bfd_vma) 0;
   link_info.pei386_auto_import = false;
-  link_info.combreloc = false;
+  link_info.combreloc = true;
   link_info.spare_dynamic_tags = 5;
 
   ldfile_add_arch ("");

I had a few questions regarding this process of switching over to
using -z combreloc...

1) Exactly which elf targets currently support -z combreloc?
I assume the ones that don't can be fixed if a machine of that
arch is made available to the binutils maintainers.
2) Are there any patches or build changes needed for glibc 2.2.4?
We are currently using glibc 2.2.4 which is a cvs snapshot current
to...

2001-09-28  Ulrich Drepper  <drepper@redhat.com>

	* elf/elf.h: Define SHF_GROUP and SHF_TLS.

...are there any changes in glibc cvs since then with
essential fixes for -z combreloc to work properly on
any arches?

3) Lastly, if one builds binaries on a machine with
a binutils installed with -z combreloc enabled and
transfers this to a machine with an older binutils
with -z combreloc disabled...should we expect any
backward compatibility issues in running these? 
      Thanks in advance for any information on these
topics.
                     Jack
------------------------------------------------------------------------------
Jack W. Howarth, Ph.D.                                    231 Albert Sabin Way
NMR Facility Director                              Cincinnati, Ohio 45267-0524
Dept. of Molecular Genetics                              phone: (513) 558-4420
Univ. of Cincinnati College of Medicine                    fax: (513) 558-8474

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: -z combreloc
@ 2001-10-13 13:15 Jack Howarth
  2001-10-13 13:32 ` Jakub Jelinek
  2001-10-13 13:53 ` Andrew Cagney
  0 siblings, 2 replies; 14+ messages in thread
From: Jack Howarth @ 2001-10-13 13:15 UTC (permalink / raw)
  To: ac131313, binutils

Andrew,
    I'm not sure I understand what you mean. I didn't
mean to imply that change should go into the cvs.
I mean to alert everyone that Debian was taking the
leap in sid to using -z combreloc.
    A few other questions for anyone who would care
to answer...

So far I have been able to test a simple case with prelink
(it always has passed its own make check). I rebuilt zip
with the new binutils 2.11.92.0.5 and found that I got...

howarth@bogus:~/debian6/zip-2.30$ LD_DEBUG=statistics ./zip 
08344:                   number of relocations: 256
08344:        number of relocations from cache: 99

...after prelinking this binary I got...

howarth@bogus:~/debian6/zip-2.30$ LD_DEBUG=statistics ./zip
08355:                   number of relocations: 0
08355:        number of relocations from cache: 16

...and it seems to be running okay. I also tried doing the
same with bash but it complained...

prelink ./bash
prelink: /lib/libncurses.so.5.2: Not enough room to add .dynamic entry

I take this to imply that as far as prelinking goes that
not only does the program in question have to be rebuilt
under a newer binutils but all libs linked in have to
be as well. Is this true?
    Lastly back to -z combreloc...is there a good way to
benchmark any speed up gained by recompiling with that 
option enabled in binutils? Jakub seems to have different
output from LD_DEBUG=statistics than we do (he can get
....

LD_DEBUG=statistics kmail
14751:
14751:  runtime linker statistics:
14751:    total startup time in dynamic loader: 226875015 clock cycles
14751:              time needed for relocation: 223635459 clock cycles (98.5%)
14751:                   number of relocations: 24432
14751:        number of relocations from cache: 45710
14751:             time needed to load objects: 2969083 clock cycles (1.3%)


...whereas all we seem to get in debian is a simple listing of
relocations. Thanks in advance for any information.
                      Jack
------------------------------------------------------------------------------
Jack W. Howarth, Ph.D.                                    231 Albert Sabin Way
NMR Facility Director                              Cincinnati, Ohio 45267-0524
Dept. of Molecular Genetics                              phone: (513) 558-4420
Univ. of Cincinnati College of Medicine                    fax: (513) 558-8474

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: -z combreloc
@ 2001-10-13 18:38 Jack Howarth
  2001-10-13 19:01 ` Andrew Cagney
  2001-10-13 20:12 ` Andrew Cagney
  0 siblings, 2 replies; 14+ messages in thread
From: Jack Howarth @ 2001-10-13 18:38 UTC (permalink / raw)
  To: chris, binutils

Andrew,
    I'm rather amused that you are giving debian such grief
for daring to use the actual version number coupled with
a packaging version number, yet I haven't hear a peep out
of you about RedHat doing the same. I would remind you
that RedHat srpms for binutils, while they are based on
the hjl tarballs, contain patches from maintainers who
are not hjl. Also RedHat isn't the only rpm based system.
So one could just as easily make the argument that RedHat
should never release anything without using 2.11.92.rh.5
or such...

from  "/pub/redhat/linux/7.1/en/os/i386/SRPMS"
-rw-r--r--    4 0        0         7064578 Apr 08  2001 binutils-2.10.91.0.2-3.src.rpm

                     Jack
------------------------------------------------------------------------------
Jack W. Howarth, Ph.D.                                    231 Albert Sabin Way
NMR Facility Director                              Cincinnati, Ohio 45267-0524
Dept. of Molecular Genetics                              phone: (513) 558-4420
Univ. of Cincinnati College of Medicine                    fax: (513) 558-8474

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

end of thread, other threads:[~2001-10-14  8:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-13 10:47 -z combreloc Jack Howarth
2001-10-13 12:25 ` Andrew Cagney
2001-10-13 13:20 ` Jakub Jelinek
2001-10-13 13:15 Jack Howarth
2001-10-13 13:32 ` Jakub Jelinek
2001-10-13 13:53 ` Andrew Cagney
2001-10-13 15:30   ` Christopher C. Chimelis
2001-10-13 17:58     ` Andrew Cagney
2001-10-13 18:38 Jack Howarth
2001-10-13 19:01 ` Andrew Cagney
2001-10-13 19:14   ` Christopher C. Chimelis
2001-10-13 20:12 ` Andrew Cagney
2001-10-14  8:29   ` Daniel Jacobowitz
2001-10-14  8:46     ` Andrew Cagney

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