Link with mixed IR/non-IR objects
Markus Trippelsdorf
markus@trippelsdorf.de
Wed Apr 27 15:06:00 GMT 2011
On 2011.04.27 at 07:38 -0700, H.J. Lu wrote:
> On Wed, Apr 27, 2011 at 7:29 AM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
> > On 2011.04.27 at 06:49 -0700, H.J. wrote:
> >> Here is a proposal to link with mixed IR/non-IR objects:
> >>
> >> * 2 kinds of object files
> >> Â o non-IR object file has
> >> Â Â * non-IR sections
> >> Â o IR object file has
> >> Â Â * IR sections
> >> Â Â * non-IR sections
> >> Â Â * The output of "ld -r" with mixed IR/non-IR objects should work
> >> with:
> >> Â Â Â Â o Compilers/linkers with IR support.
> >> Â Â Â o Compilers/linkers without IR support.
> >> * Add the mixed object file which has
> >> Â o IR sections
> >> Â o non-IR sections:
> >> Â Â * Object codes from IR sections.
> >> Â Â * Object codes from non-IR object files.
> >> Â o Object-only section:
> >> Â Â * With section name ".gnu_object_only" and SHT_GNU_OBJECT_ONLY
> >> type
> >> Â Â on ELF:
> >> Â Â #define SHT_GNU_OBJECT_ONLY 0x6ffffff8 Â Â /* Object only */
> >
> > I'm wondering if it wouldn't be better to simply use:
> > SHT_GNU_IRBITS (= 0x6fff4952)
> > that has already been proposed here:
> > http://gcc.gnu.org/wiki/whopr/driver ?
> >
> > »Thus, we plan to mark the IR sections with a special section type,
> > SHT_GNU_IRBITS (= 0x6fff4952).«
> >
>
> They are different. SHT_GNU_OBJECT_ONLY section doesn't contain
> any IR. It encapsulates a relocatable object file without any IR bits.
Of course. What I was trying to ask was if SHT_GNU_IRBITS and
SHT_GNU_OBJECT_ONLY aren't exactly complementary to each other?
(IOW, if SHT_GNU_IRBITS would be implemented, would there still be a
need for SHT_GNU_OBJECT_ONLY?)
--
Markus
More information about the Binutils
mailing list