Jack Howarth <howa...@bromo.med.uc.edu> writes:

> On Sun, Mar 13, 2011 at 11:53:59AM -0700, Ian Lance Taylor wrote:
>> Jack Howarth <howa...@bromo.med.uc.edu> writes:
>> 
>> > So lto-object.c needs a rewrite to use only a single section for GNU_LTO 
>> > with subsections.
>> > Unfortunately I can't find any documentation for using subsections in 
>> > mach-o which may imply we will
>> > be forced to use an elf container to obtain those, no?
>> 
>> We can format the information in the section any way we like.  No reason
>> to fix on subsections or on ELF, though both are certainly options.  The
>> important characteristics are: 1) the Mach-O assembler has to accept it;
>> 2) the simple-object interface in libiberty has to read it.
>> 
>> Ian
>
> Ian,
>     Are there any places in the current gcc sources which would give us 
> examples
> of using the simple-object interface of libiberty in a manner similar to what 
> we
> need for storing the lto data in the mach-o section? Or perhaps in an older 
> FSF 
> gcc release?

I think you are overthinking this.  What LTO needs to do is really
simple: store byte sequences with names.  Anything which lets you do
that will work.  You need to write it out in a way that the assembler
will accept; simple-object is not involved at that point.  And you need
to modify simple-object to read it.  And then you need to modify
simple-object to write it, for the plugin to use.

Ian

Reply via email to