Fwd: [PATCH, ARM]An accurate way to calculate the target arch attribute
Terry Guo
terry.guo@arm.com
Wed Nov 19 10:33:00 GMT 2014
More information about the Binutils mailing list
Wed Nov 19 10:33:00 GMT 2014
- Previous message (by thread): Fwd: [PATCH, ARM]An accurate way to calculate the target arch attribute
- Next message (by thread): Fwd: [PATCH, ARM]An accurate way to calculate the target arch attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> -----Original Message----- > From: binutils-owner@sourceware.org [mailto:binutils- > owner@sourceware.org] On Behalf Of Richard Earnshaw > Sent: Wednesday, November 19, 2014 6:16 PM > To: Terry Guo; binutils@sourceware.org > Subject: Re: Fwd: [PATCH, ARM]An accurate way to calculate the target arch > attribute > > On 29/09/14 04:10, Terry Guo wrote: > > Hi there, > > > > When target isn't specified from either command line or .arch/.cpu > > directive, current gas will calculate the target arch before > > relaxation step and assume that a possible relaxation will happen > > anyway even this relaxation doesn't happen in late relaxation step. > > This causes a overly assumption to target arch e.g. set target arch to > > armv6t2 where armv4t is good enough. > > > > The attached patch intends to do an accurate calculation of target > > arch by considering the target arch in relaxation step. > > > > Tested with Binutils regression test. Is it OK? > > > > BR, > > Terry > > > > gas/ > > 2014-09-29 Terry Guo <terry.guo@arm.com> > > > > * config/tc-arm.c (md_assemble): Do not consider relaxation. > > (md_convert_frag): Test and set target arch attribute accordingly. > > (aeabi_set_attribute_string): Turn it into a global function. > > * config/tc-arm.h (md_post_relax_hook): Enable it for ARM target. > > (aeabi_set_public_attributes): Declare it. > > > > gas/testsuite/ > > 2014-09-29 Terry Guo <terry.guo@arm.com> > > > > * gas/arm/attr-arch-assumption.d: New file. > > * gas/arm/attr-arch-assumption.s: Likewise. > > > > These bits seem essentially OK, but ... > > > ld/testsuite/ > > 2014-09-29 Terry Guo <terry.guo@arm.com> > > > > * ld-arm/tls-longplt-lib.d: Updated. > > * ld-arm/tls-longplt-lib.s: Likewise. > > * ld-arm/tls-longplt.d: Likewise. > > * ld-arm/tls-longplt.s: Likewise. > > Why is this needed? This code doesn't look like it needs to assume v6t2 as a > baseline. > > R. Thanks for review. Before my patch, the target arch for those .s files are calculated in an inaccurate way, the armv6t2 is assumed here. Hence the content of .d files are for armv6t2. Now with my patch, the arch for those files are calculated in an accurate way, the armv4t is assumed here, so the existing .d files can't be matched. There are two ways to avoid such mismatch, one is to explicitly set arch to armv6t2 in .s files, then no need to change the .d files. Another is to update the .d files without touching the .s files. Which way is better in your opinion? BR, Terry
- Previous message (by thread): Fwd: [PATCH, ARM]An accurate way to calculate the target arch attribute
- Next message (by thread): Fwd: [PATCH, ARM]An accurate way to calculate the target arch attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list