This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armlink: symdefs generation

Note: This was originally posted on 19th November 2008 at http://forums.arm.com

Hi all,

I use ARM linker, ADS1.2 [Build 848].
I found some strangeness with generation of the Symbol Definitions file.
So, what I do, step by step (with CodeWarrior):

1. Project->Remove Object Code
2. Make
The symdefs file is created, and 89 global symbols are written to the symdefs file.
After that I repeat:
3. Project->Remove Object Code (symdefs file is not deleted automatically).
4. Make
The symdefs file is rebuilt, but only 67 global symbols have been remained in the symdefs file.

As I change nothing, just rebuild the project, I expect that the number of global symbols must not be changed, and as a result the symdefs file should be identical to the previously created.

Please, could somebody explain me where I am wrong? And, what do I have to do to avoid this problem?

Thank you,
Alexandre.
Parents
  • Note: This was originally posted on 25th November 2008 at http://forums.arm.com

    may be the 22 symbols which got removed were not used at all in the final binary?
    In the link which Jacob has given, it asks to remove the unused symbols manually. we write symdefs manually and feed it to the linker. I dont know about ADS. sorry. but may be it removed automatically?(seems like!)
    cheers
    Aj

    Jacob, arunjr, thanks a lot for answers.
    I understand what you mean. I have read armlink documentation thoroughly. This is because I'm discouraged.

    Since I do not modify symdefs file at all, and since the first time created file already includes ALL global symbols, and since I do not modify my sources/project/options etc but just recompile/relink the project, so, exactly the same set of global symbols should be generated in the "temporary output file" (in terms of Jacob's link), and no one line must be added or deleted from the original one.

    Jacob's link:
    -----------------------------------------------------------------------
    armlink updates a symdefs file as follows:

    1. armlink creates a temporary output file.

    2. Lines from filename are processed:

        a. The comments and blank lines are copied unchanged to the temporary file. [color="#0000FF"][Aleph1024] there are no comments and no empty lines in the file, as this file is created by armlink and not modified manually[/color]

        b. When a symbol name is found in filename, the definition of the named symbol from the current image is output to the temporary file. [color="#0000FF"][Aleph1024] image should be the same with the same set of global symbols since nothing has been changed[/color]

    Note
    If a symbol occurs in filename more than once, only one definition of the symbol is placed in the temporary file. [color="#0000FF"][Aleph1024] symbol cannot be duplicated since the file is standard armlink generated one without any changes[/color]

    If a symbol is found in filename but is not defined in the current image, no output will be produced for that symbol. [color="#0000FF"][Aleph1024] all symbols should be found as nothing has been modified/added/deleted[/color]

    If the final link is successful, filename is deleted and the temporary file renamed as filename.[color="#0000FF"][Aleph1024] New shorter file is created[/color]
    -----------------------------------------------------------------------
    :)
Reply
  • Note: This was originally posted on 25th November 2008 at http://forums.arm.com

    may be the 22 symbols which got removed were not used at all in the final binary?
    In the link which Jacob has given, it asks to remove the unused symbols manually. we write symdefs manually and feed it to the linker. I dont know about ADS. sorry. but may be it removed automatically?(seems like!)
    cheers
    Aj

    Jacob, arunjr, thanks a lot for answers.
    I understand what you mean. I have read armlink documentation thoroughly. This is because I'm discouraged.

    Since I do not modify symdefs file at all, and since the first time created file already includes ALL global symbols, and since I do not modify my sources/project/options etc but just recompile/relink the project, so, exactly the same set of global symbols should be generated in the "temporary output file" (in terms of Jacob's link), and no one line must be added or deleted from the original one.

    Jacob's link:
    -----------------------------------------------------------------------
    armlink updates a symdefs file as follows:

    1. armlink creates a temporary output file.

    2. Lines from filename are processed:

        a. The comments and blank lines are copied unchanged to the temporary file. [color="#0000FF"][Aleph1024] there are no comments and no empty lines in the file, as this file is created by armlink and not modified manually[/color]

        b. When a symbol name is found in filename, the definition of the named symbol from the current image is output to the temporary file. [color="#0000FF"][Aleph1024] image should be the same with the same set of global symbols since nothing has been changed[/color]

    Note
    If a symbol occurs in filename more than once, only one definition of the symbol is placed in the temporary file. [color="#0000FF"][Aleph1024] symbol cannot be duplicated since the file is standard armlink generated one without any changes[/color]

    If a symbol is found in filename but is not defined in the current image, no output will be produced for that symbol. [color="#0000FF"][Aleph1024] all symbols should be found as nothing has been modified/added/deleted[/color]

    If the final link is successful, filename is deleted and the temporary file renamed as filename.[color="#0000FF"][Aleph1024] New shorter file is created[/color]
    -----------------------------------------------------------------------
    :)
Children
No data