Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

remap section .exception

Hi guys,

I would like to map the .exceptions section to a location in memory different to the location specified in the autogenerated linker script or exclude it at all from the elf file.

The linker flag --section-start=.exceptions=0x1100000 has been ignored by the IDE.

Is there any other way to move this section or an option to tell the linker to ignore it?

thanks for any help!

--Wolf

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by pfab@Dec 22 2005, 10:39 AM

    hi guys,

    i would like to map the .exceptions section to a location in memory different to the location specified in the autogenerated linker script or exclude it at all from the elf file.

    the linker flag --section-start=.exceptions=0x1100000 has been ignored by the ide.

    is there any other way to move this section or an option to tell the linker to ignore it?

    thanks for any help!

    --wolf

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11741)

    --- quote end ---

    --- Quote End ---

    In the SOPC builder under "More cpu settings" you can change the exception address, which will change where the exceptions section is located. I think that&#39;ll probably change where everything else is located too though.

    Also if you want to pass options to the linker you need to use the -Wl option. For instance, I have one of my projects configured to generate a map file when it builds. So in the C/C++ Build section, I have the string "-Wl,-Map -Wl,app.map" in the Linker Flags box. Maybe that&#39;s why the IDE is ignoring your --section-start option?

    Finally you can use a customized linker script by going into your system library properties and choosing "Custom linker script". I think most people make a copy of the generated.x file, name it something else, and then modify it according to their needs. I&#39;m not too familiar with the syntax there, but if you search for "generated.x" or "linker" I&#39;m sure you&#39;ll find some threads with instructions on how to modify it.