1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Information Exchange between MAP file and Linker Command File (Linker Script)

Discussion in 'Embedded' started by karthikbg, Jan 25, 2007.

  1. karthikbg

    karthikbg Guest

    Hi,

    I do not find any option in Linker Script for passing values from
    another file to Linker Script. Is it there ? ( Did i miss it :( ?? )
    I think, i will write my own Perl Script for extracting the used
    memory info from MAP file to find the remaining unused space and write
    that unused space
    at the corresponding location in the Linker Command File. But, if
    there is an option available
    with the Linker Command File programming for information exchange with
    MAP file,
    it would be really nice. Is it there ?

    Below is the scenario :
    I need to tell application 'A' to use the unused space of application
    'B' .
    , but this info has to
    be told to application 'A'.

    How to tell my Linker Command FIle (Linker Scripts) of application 'A'
    that the application 'B' has some amount of Unused memory in a certain
    region and so the application 'A' can use that memory ?
    That is , how to do information exchange between MAP file and Linker
    Script using Linker
    Script programming techniques ?


    Thx in advans,
    Karthik Balaguru
     
    karthikbg, Jan 25, 2007
    #1
    1. Advertisements

  2. Impossible for anyone other than you to tell, because you forgot to
    mention which linker's script language you're talking about.
    And what on earth would you want to do that for?
    The linker *creates* the map file. There's no reason for it to read it.
    You don't. You configure the linker scripts for both applications to
    use separate memory spaces, and only worry about changing them if and
    when one of them overflows its quota.
     
    Hans-Bernhard Bröker, Jan 27, 2007
    #2
    1. Advertisements

  3. Why do you use separate linking for applications A and B ?

    The last time I used separate linking was in the days of 8" floppies
    and 2 KiB EPROMs with 5 minute programming times :).

    Anyway, without knowing what linker you are using and if it supports
    generating of symbol table files, I would create a dummy module that
    only contains the definition of symbol ZZZZZZ and make sure that this
    module is loaded after all other modules in application B. Depending
    on the linker, the module would be loaded last simply by putting the
    module last in in the file list, by using a suitable file name, such
    as zzzzzz to put it last or using program section attributes. Consult
    your linker manual in which order the modules will be loaded.

    The linker of application A should read the symbol table file to
    locate the symbol ZZZZZZ (or if everything else fails, search the map
    file from link B to find the symbol ZZZZZZ).

    Paul
     
    Paul Keinanen, Jan 28, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.