This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symbol size as function size


Nick,

On Fri, 24 Jun 2011 09:29:38 +0100, Nick Clifton wrote:
> You do not say for which target(s) you are having this problem.
>

This is for our own port of binutils. We developed the backend for GCC and 
now we are working on improving what we have for binutils which is not as 
polished as we would've liked since we have been mostly using an internal 
assembler/linker we developed some time ago.
 
> Alan has already mentioned one way of solving the problem.  Here is
> another - the cause is probably that the assembler is computing the
> value of ". - sum" rather than leaving it to the linker.  In order to
> prevent this you need to define md_allow_local_subtract and have it
> decide when it is necessary to postpone the calculation until link time.
> 

Indeed the problem is that ". - sum" is being computed by the assembler 
instead of being left to the linker.

I am wondering if there is any catch to this. Alan's suggestion is quite 
heavy-weight in that it requires quite a bit of implementation (or sounds 
like it). However, yours seems much more straightforward. I wonder if I am 
missing something. I will give it a go and will report back.

Thanks for the help.





-- 
PMatos


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]