[lkml]   [2008]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: PROC macro to annotate functions in assembly files
    On Wed, Dec 17, 2008 at 12:12:14PM +0100, Alexander van Heukelum wrote:
    > Yeah, assembly files contain some interesting nesting. In this
    > particular case I think the solution is simple... Just use PROC
    > and ENDPROC around the complete functions, and leave the explicit
    > .global's for the additional entry points.

    I'm sorry, that doesn't work in all cases.

    On ARM with later toolchains, there's additional metadata associated with
    every symbol, and it's beginning to matter getting this right. That
    metadata includes whether it's a function, and more importantly whether
    the code pointed to by the symbol is Thumb or ARM.

    This leads to:




    and we want both of those symbols to have exactly the same attributes.

    Merely adding a .globl for the second name doesn't do that. It needs
    .globl, .size, and .type.

    So what you're actually talking about using your approach is enforcing
    the pairing of the existing ENTRY/ENDPROC and open coding everything

    Forgive me if I think this is a backward step. It certainly seems to
    add some insane restrictions.

    Russell King
    Linux kernel 2.6 ARM Linux -
    maintainer of:

     \ /
      Last update: 2008-12-18 12:49    [W:0.031 / U:165.984 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site