Messages in this thread | | | Date | Thu, 10 Jan 2008 08:37:44 -0800 | From | John Reiser <> | Subject | Re: STT_FUNC for assembler checksum and semaphore ops" in git-x86 |
| |
>>+ .type csum_partial, @function >> ENTRY(csum_partial) >>+ .type csum_partial, @function >> ENTRY(csum_partial) >> CFI_STARTPROC >> pushl %esi >>@@ -141,11 +142,13 @@ ENTRY(csum_partial) >> ret >> CFI_ENDPROC >> ENDPROC(csum_partial) >>+ .size csum_partial, . - csum_partial
>>AK [Andi Kleen]: >>Better option would be to just add to ENTRY/ENDPROC ...
> John got more or less same comment from me [Sam Ravnborg] - but > I did not hear further. > As it stands out now it not nice.
It does look ugly. But .size and .type are oriented towards static description, while the dwarf2 CurrentFrameInfo (CFI) annotations are oriented towards dynamic traceback and unwinding. Forcing the coupling between static and dynamic annotation might lead to trouble when the fast path to 'ret' is in the middle, and code for the slow path appears after the 'ret'; or when a recursive tail 'falls through" into the entry point.
A quick test shows that multiple .size pseudo-ops for the same symbol are accepted (the last one wins) so default coupling can be overridden.
I'll test revised macros and report shortly.
-- John Reiser, jreiser@BitWagon.com
| |