Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2012 10:39:27 +0800
From:      pete <petechou@gmail.com>
To:        Kurt Lidl <lidl@pix.net>
Cc:        FreeBSD Hackers <hackers@freebsd.org>, Erik Cederstrand <erik@cederstrand.dk>
Subject:   Re: [CFT/RFC] Make crunched compatible with external linkers
Message-ID:  <CANWS6nc7t0=78v0nOtoFfcsukaiBnEeQsTj-bwqC3JEYHQ_Cxg@mail.gmail.com>
In-Reply-To: <20121204191140.GA56790@pix.net>
References:  <779286D2-F710-45FF-8C38-59513B5C1B7D@cederstrand.dk> <20121204191140.GA56790@pix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 5, 2012 at 3:11 AM, Kurt Lidl <lidl@pix.net> wrote:

> On Tue, Dec 04, 2012 at 11:06:56AM +0100, Erik Cederstrand wrote:
> > Hello hackers,
> >
> > The following PR patches crunchide(1) to accept object files produced by
> the gold and mclinker linkers:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=bin%2F174011
> >
> > On behalf of the submitter, I'd like to request a review of the patch,
> and testing of crunchide/crunchgen especially on SPARC and ARM.
>
> I applied this patch to a 9/stable source tree, and was able to
> "buildworld" with it in place, on my sparc64 machine.
>
> I know that's not a great test case, but the patched binary
> is good enough to generate the objects that are needed for the
> 'rescue' binary.  And that binary runs at least a trivial test
> of '/usr/obj/usr/src/rescue/rescue/rescue ifconfig -a' and
> produces correct output.
>
> -Kurt
>

Really thanks for your help!

This patch is for crunchide to handle ELF object file in a more general
way, but not be limited to the custom section layout (i.e., section
headers, .symtab, and then .strtab are @EOF). And if we are still using
ld(1), I think the patched crunchide should produce exactly the same output
as before. Then the rescue binary would also be the same.

I checked and verified the intermediate object files and rescue binary (via
binary diff) on X86 FreeBSD 9.0. If you can also kindly help check this on
different archs and feedback, I think the result will be very helpful.

Thanks,
Pete



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANWS6nc7t0=78v0nOtoFfcsukaiBnEeQsTj-bwqC3JEYHQ_Cxg>