Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to declare C structure for assembly file


    The below structure is declared in (arch/arm/include/asm/smp.h) header file.

    struct secondary_data {
    unsigned long pgdir;
    void *stack;
    extern struct secondary_data secondary_data;

    Iam using ASMP kernel, so smp.h is not included for compilation. I placed the structure declaration in (arch/arm/include/asm/ptrace.h).

    This header file (ptrace.h) is included in assembly file (omap-headsmp.S). When i tried to use that structure in assembly file(omap-headsmp.S), it encountered the error undefined reference to struct secondary_data. Kindly let me know how assembly language will refer the structure declaration.


  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Welcome to the forums.
    Please refrain from posting the same post more than once. It's against forum rules, please continue here only.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts