Re: [PATCH] libiberty simple object XCOFF support

2013-01-01 Thread Steven Bosscher
On Tue, Jan 1, 2013 at 6:04 PM, David Edelsohn wrote:
 There are open questions about how to wedge GCC LTO support into the
 AIX XCOFF file format. I am unsure if LTO can be an additional section
 in the XCOFF file or should be new CSECTs in an existing section.
 Maybe CSECTs in the XCOFF comment section.

Does XCOFF differ a lot from COFF? Otherwise you could take some ideas
from simple-object-coff.c.

Ciao!
Steven


Re: [PATCH] libiberty simple object XCOFF support

2013-01-01 Thread Ian Lance Taylor
On Tue, Jan 1, 2013 at 9:10 AM, Steven Bosscher stevenb@gmail.com wrote:

 Does XCOFF differ a lot from COFF?

In a word, yes.  While COFF and XCOFF share a distant ancestor, they
are in effect completely different object file formats.

Ian


Re: [PATCH] libiberty simple object XCOFF support

2013-01-01 Thread David Edelsohn
On Tue, Jan 1, 2013 at 12:31 PM, Ian Lance Taylor i...@google.com wrote:
 On Tue, Jan 1, 2013 at 9:10 AM, Steven Bosscher stevenb@gmail.com wrote:

 Does XCOFF differ a lot from COFF?

 In a word, yes.  While COFF and XCOFF share a distant ancestor, they
 are in effect completely different object file formats.

simple-object-xcoff.c is based on simple-object-coff.c, which is why I
acknowledged Ian in the authorship. The file header and section
support is very similar. The 64 bit AIX XCOFF format complicated the
structure layouts a little.

AIX XCOFF embedded / inserted another layout of control sections
within sections. I need to investigate how much CSECT support is
necessary in simple object for the way that GCC LTO utilizes simple
object. The patch is a start with basic functionality.

Thanks, David


Re: [PATCH] libiberty simple object XCOFF support

2013-01-01 Thread Ian Lance Taylor
On Tue, Jan 1, 2013 at 9:04 AM, David Edelsohn dje@gmail.com wrote:
 The attached patch is a start at libiberty simple object support for
 AIX XCOFF file format.  With this patch, the simple object API can
 read and write XCOFF files. I need to investigate a little more about
 the proper attributes for XCOFF sections written using sobj.

 There are open questions about how to wedge GCC LTO support into the
 AIX XCOFF file format. I am unsure if LTO can be an additional section
 in the XCOFF file or should be new CSECTs in an existing section.
 Maybe CSECTs in the XCOFF comment section.

 * simple-object-xcoff.c: New file.
 * Makefile.in: Add it to build machinery.
 * simple-object-common.h (simple_object_xcoff_functions): Declare.
 * simple-object. (format_functions): Add simple_object_xcoff_functions.


 +  return COFF object format mismatch;

Should say XCOFF.

This patch is OK by me.

Ian