From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18012 invoked by alias); 14 Oct 2011 16:40:29 -0000 Received: (qmail 17783 invoked by uid 22791); 14 Oct 2011 16:40:25 -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,TW_BJ,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 16:40:11 +0000 Received: by qadc1 with SMTP id c1so1144220qad.20 for ; Fri, 14 Oct 2011 09:40:11 -0700 (PDT) Received: by 10.224.187.197 with SMTP id cx5mr7100976qab.55.1318610411106; Fri, 14 Oct 2011 09:40:11 -0700 (PDT) Received: from localhost (physicsnat56.physics.umass.edu. [128.119.50.38]) by mx.google.com with ESMTPS id fa9sm12382972qab.5.2011.10.14.09.40.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Oct 2011 09:40:10 -0700 (PDT) From: Ben Gamari To: gcc@gcc.gnu.org Subject: [BUG?] GCC 4.5.2 produces deprecated ARM relocation User-Agent: Notmuch/0.7-37-g5c3c7f6 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 14 Oct 2011 17:38:00 -0000 Message-ID: <877h47msrc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00225.txt.bz2 I was recently trying to test GCC's behavior in producing various types of ARM relocations. In particular, I was trying to produce an R_ARM_JUMP24 relocation, which requires veneer. It was suggested that the code most likely to produce this relocation would involve some sort of tail recursion. I wrote up a small test[1] involving interworking and tail recursion to see what the produced object might look like. To my surprise, I found that the compiler instead[2] produced the deprecated R_ARM_PLT32 relocation. Considering the deprecated state of this relocation type, should this be considered a bug? Being a linker implementer, I for one would greatly appreciate it if GCC tried to only use non-deprecated relocation types. I apologize if this has already been fixed upstream. Cheers, - Ben [1] https://github.com/bgamari/arm-interworking-test [2] $ make cc -marm -fPIC -c -o main.o main.c cc -mthumb -fPIC -c -o thumb.o thumb.c gcc main.o thumb.o -o test.o $ objdump -r main.o main.o: file format elf32-littlearm RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 00000008 R_ARM_PLT32 hi