From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27491 invoked by alias); 1 Feb 2012 16:40:49 -0000 Received: (qmail 27394 invoked by uid 22791); 1 Feb 2012 16:40:47 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f169.google.com (HELO mail-tul01m020-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Feb 2012 16:40:32 +0000 Received: by obbta7 with SMTP id ta7so1972616obb.0 for ; Wed, 01 Feb 2012 08:40:32 -0800 (PST) Received: by 10.182.36.35 with SMTP id n3mr39935091obj.66.1328114432161; Wed, 01 Feb 2012 08:40:32 -0800 (PST) Received: from Deathwish.hagood ([74.221.200.84]) by mx.google.com with ESMTPS id g2sm23890932obw.7.2012.02.01.08.40.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Feb 2012 08:40:31 -0800 (PST) Received: from localhost (Deathwish [127.0.0.1]) by Deathwish.hagood (Postfix) with ESMTP id D3001C7B8044 for ; Wed, 1 Feb 2012 10:40:29 -0600 (CST) Received: from deathwish ([127.0.0.1]) (SquirrelMail authenticated user wowbaggr) by localhost with HTTP; Wed, 1 Feb 2012 10:40:29 -0600 Message-ID: <35a37ea957466b2f7a770e7978aebfef.squirrel@localhost> Date: Wed, 01 Feb 2012 16:40:00 -0000 Subject: Strange ARM issue: wrong exception table type? From: david.hagood@gmail.com To: binutils@sourceware.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00000.txt.bz2 I am having a strange issue with cross-compiling ARM programs. When I build a C++ executable that throws exceptions, they don't work: no catch() statements work, and all throw operations go straight to std::terminate(). My co-workers, who are using in theory the exact same tool chain, don't see this (and I've checked the md5sum of their tools vs. mine and they seem to match). I've traced it down to the assembler: I can have them compile the C++ file to a .s, and just assemble and link it, and it breaks. If they send me a .o and I link that, it works. The assembler files they send me are the same as the ones my compiler generates (verified via diff), but the objects they produce vs. the objects I produce are different. I've traced the point of difference to the .ARM.extab and .ARM.exidx sections: Contents of section .ARM.extab: - 0000 00000080 84429b01 b0b0b083 ff002501 .....B........%. + 0000 00000000 84429b01 b0b0b083 ff002501 .....B........%. 0010 1b1c9001 ac0101c0 01040000 dc013cac ..............<. Contents of section .ARM.exidx: - 0000 00000080 00000080 7c010080 34000080 ........|...4... - 0010 e0010080 40000080 ....@... + 0000 00000000 00000000 7c010000 34000000 ........|...4... + 0010 e0010000 40000000 ....@... If I read the ARM EABI spec correctly, the difference is that my assembler is generating the ARM Compact form (bit 31 set), and theirs are generating the standard form. I assume that's preventing the run time library from finding the catch() blocks. What would cause my "as" to generate a different output than theirs for the same input file? (and I've verified the MD5 of my "as" and theirs match). And how can I fix this?