PATCH: PR ld/4701: binutils generates invalid klibc-based binary on Linux x86_64

H. J. Lu hjl@lucon.org
Thu Jun 28 04:20:00 GMT 2007


On Thu, Jun 28, 2007 at 12:30:27PM +0930, Alan Modra wrote:
> On Wed, Jun 27, 2007 at 07:40:27PM -0700, H. J. Lu wrote:
> > Linux ld.so isn't OK with your change. We haven't seen the problem
> > because we won't get a PT_LOAD segment with .bss sections only
> > using the default linker script. I uploaded a testcase to:
> > 
> > http://sourceware.org/bugzilla/show_bug.cgi?id=4701
> 
> Arggh!  I was sure this worked!  So we should go back to using my voff
> code probably, or otherwise hack p_offset.

Whatever we do, we should follow gABI.

> 
> Meanwhile, please let me know exactly why klibc was unhappy, as I'm
> concerned that whatever is causing the segv there might also be
> affected by overlapping p_offset for bss segments.

My testcase is derived from klibc. Executables have a one PT_LOAD
segment with only a .bss section. The only difference is the failed
ones in klibc are executables, which are loaded by kernel, and mine
is a shared library, which is loaded by ld.so.


H.J.



More information about the Binutils mailing list