From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1928 invoked by alias); 14 Apr 2010 22:10:35 -0000 Received: (qmail 1885 invoked by uid 48); 14 Apr 2010 22:10:21 -0000 Date: Wed, 14 Apr 2010 22:10:00 -0000 Message-ID: <20100414221021.1884.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/43729] Mach-O LTO support needed for darwin In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01415.txt.bz2 ------- 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