This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: symbol size as function size
- From: Mike Frysinger <vapier at gentoo dot org>
- To: "Paulo J. Matos" <pocmatos at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 24 Jun 2011 13:41:49 -0400
- Subject: Re: symbol size as function size
- References: <itvosh$96k$1@dough.gmane.org>
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