This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix "SIZEOF and .tbss" patch


Jakub Jelinek wrote:
On Thu, Mar 04, 2004 at 03:35:03PM +0000, Nathan Sidwell wrote:

Nick,

This patch implements that functionality in a different manner. Rather than
lie about .tbss's size, I tweak the couple of places that need to know
it can be ignored for layout purposes.

It appears that there are now some new failures in the linker
testsuite with this patch applied:

This patch adds the equivalent bit into elf.c's segment mapping. With this patch I find the linkers testsuite has the same failures as without the patch (on i686-pc-linux-gnu). ok?

I'll investigate those failures I'm seeing -- it might be related
to me using a gcc-3.4-pre compiler. I'd understand if you'd like to
hold off this patch until these other failures are resolved.


This patch is still wrong.
One problem is e.g. mapping following sections:
.text
[ VMA gap here ]
.tbss
.data
.bss
Your change was ignoring .tbss only in one of the 2 places where
last_hdr is set up, but .tbss really cannot be ignored, but rather should
be handled as if it was SEC_LOAD and had zero _raw_size.
Without this, I get e.g. tlsg failures with -z relro patch (which reorders
sections).
Ok to commit?

2004-03-26 Jakub Jelinek <jakub@redhat.com>

* elf.c (map_sections_to_segments): Fix handling of .tbss.
Thanks for fixing this.  One reason I didn't do it the way you've found to
be necessary is that there's no test case checking the situation you
discovered.  Any chance of adding one?

You will also need to apply it to the 2_15 branch (or revert my patch there)

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]