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


On Thu, Jun 23, 2011 at 12:16, Paulo J. Matos wrote:
> Following a post to gcc mailing list I need help with setting up a binutils
> backend properly.
>
> We currently have a builtin GCC function __function_size that expands into a
> symbol and a function sum would have the assembly code:
>
> sum:
> ? ? ? ?... // CODE FOR SUM
> ? ? ? ?.global __size_of_sum
> ? ? ? ?.equ __size_of_sum, .-sum
>
> __size_of_sum would then be used as a symbol containing the size in words of
> sum.

i hope this is something you plan on pushing to mainline.  this is a
builtin ive long wished existed.  useful for things like bootloaders
that need to manually relocate specific functions.
-mike


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