[llvm-commits] [PATCH] Use an alternate symbol for function-size calc

Hal Finkel hfinkel at anl.gov
Fri Dec 30 06:58:41 PST 2011


On Fri, 2011-12-30 at 09:33 -0500, Rafael Ávila de Espíndola wrote:
> > I don't know exactly what version of binutils made the change, but I
> > believe it was sometime in 2011 (guessing from online bug reports);
> > binutils 2.21.1 displays the new behavior, 2.20.51.0.2 (which is from
> > 2009) does not.
> 
> I have been unable to reproduce this with
> 6d17265fc58ec069dd1079317f14c9cdcbb60e06
> (git://sourceware.org/git/binutils.git) targeting powerpc-pc-linux. I
> was able to assemble
> 
> -----------------------------------------------
>  	.file	"test.c"
> 	.text
> 	.globl	f
> 	.type	f, at function
> f:                                      # @f
> .Ltmp0:
> 	.cfi_startproc
> .Ltmp1:
> 	.size	f, .Ltmp1-f
> .Ltmp2:
> 	.cfi_endproc
> .Leh_func_end0:
> ------------------------------------------------
> 
> I wonder if it was a temporary bug is gas. Could you please provide a .s
> and target triple that gas rejects?

I think that you can just use the output from llc with the test case in
my patch. I apologize as I may not have said this explicitly, but the
problem only appears on powerpc64 for linux
(powerpc64-unknown-linux-gnu). If that does not reproduce the problem
for you, I'll send you a failing .s file so that we can compare.

Thanks again,
Hal

> 
> > I think that always using the local symbol going to be a safe choice
> > (apparently safer than using the global symbol name). Do we have a
> > uniform way of getting that symbol?
> > 
> > Thanks again,
> > Hal
> 
> Thanks,
> Rafael

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list