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