------- Comment #5 from steven at gcc dot gnu dot org  2010-04-14 22:10 -------
Collecting bits and pieces from all over, I'm trying to make a plan...

Consensus on IRC is that LTO data does not need its own Mach-O segment, and
that can it just fit as a section in the _TEXT (since LTO data is read-only) or
_DATA segment.

Re. changes in the darwin assembler/linker, it looks like they will just work.
>From http://gcc.gnu.org/ml/gcc/2010-04/msg00250.html:
-------------------------
Binutils for COFF targets needed a patch to allow sections to be
byte-aligned and byte-packed, as it wasn't originally possible to use any
alignment directive to reduce the section alignment below the default, and the
zip-compressed data sections need to be exactly sized to the data they contain
rather than padded up to the default section alignment of 4.

 If MachO can do that already, it won't need any changes.  Or it could be
fixed in GCC by modifying the format of the compressed sections to be
self-describing w.r.t valid data length in some way - this would probably be
the better thing to do in the long run.
-------------------------

So. Can MachO binutils already do that? Apparently yes:

$ as << ".section __TEXT,__foo"

gives a section alignment of 2^0=1 i.e. byte-aligned.

Alternatively, it is possible to disable zlib compression, although we should
try to avoid that.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43729

Reply via email to