/tmp/ccro4Ndb.s: error: symbol 'Ln1' already defined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whitechan
    New Member
    • Mar 2009
    • 1

    /tmp/ccro4Ndb.s: error: symbol 'Ln1' already defined

    Hi, I have been experiencing problems compiling my latest gnu compile code nested in c program, which runs on ARM7. the code :
    #if defined ARM_V6
    __asm void RV_FASTCALL C_EdgeFilter4x4 _RV8(
    PU8 pRec,
    const U32 uPitch,
    const U32 uWidth,
    const U32 uHeight,
    PU8 pStrengthV,
    PU8 pStrengthH)
    {
    STMFD sp!,{r4-r11,lr}
    SUB sp,sp,#4
    STR r0,[sp,#0x00] ;pRec
    LDR r4,[sp,#0x28] ;pStrengthV(r4)
    RSB r6,r2,r1,LSL #2
    ADD r6,r6,#4 ;update factor
    ADD r0,r0,#0x04 ;r(r0)
    MOV lr,r3 ;j
    Ln1
    ADD r4,r4,#1 ;pStrengthV += 1
    SUB r5,r2,#4 ;i(r5)
    Ln2
    LDRB r8,[r4],#1 ;lTemp
    MOV r7,r0 ;lpr(r7) = r
    CMP r8,#0
    BEQ Ln3
    ....
    }
    I keep on coming up against the following errors:

    /tmp/ccro4Ndb.s: Assembler messages :
    /tmp/ccro4Ndb.s: error: symbol 'Ln1' already defined
    /tmp/ccro4Ndb.s: error: symbol 'Ln2' already defined

    i revise Ln1 to LnVV1, then makefile, but come up with the same errors messages:
    /tmp/ccro4Ndb.s: Assembler messages :
    /tmp/ccro4Ndb.s: error: symbol 'LnVV1' already defined
    /tmp/ccro4Ndb.s: error: symbol 'Ln2' already defined

    Now, I have tried various ways to solve this problem, but the fact is I simply don't know what to do about it.
    obviously "Ln1" and "Ln2" are not defined in any header file or any part of the program. Irritating enough.

    Can anyone help?

    Thank you,

    gang
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    It seems like function got inlined (twice?) and label duplicates in .s file.
    google for gcc label inline assembler, or try noinline attribute.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      How many times is this function called? You might try commenting out the function calls and then restoring them one at a time to see when the errors go away and when they return.

      Could it be that assembly-language labels in an __asm function have global scope? That sounds pretty scary! It means that you could branch from the middle of one assembly language function into the middle of another. I certanily hope this isn't where your problem is coming from.

      Comment

      Working...