This is a discussion on loading a module at a specified address - VxWorks ; Hi everybody, I have a DY4181 SBC with 512 MB of memory. I use Tornado2.2.1/VxWorks5.5.1. After loading a module using the target shell (ld that the three segments (text, data e bss) get loaded at very high addresses (looking at ...
I have a DY4181 SBC with 512 MB of memory.
I use Tornado2.2.1/VxWorks5.5.1.
After loading a module using the target shell (ld < filename), I see
that the three segments (text, data e bss) get loaded at very high
addresses (looking at the output of the moduleShow command). I think
this is due to the algorithm used by the target loader to load modules.
Instead, I would like to place modules at very low addresses, as close
as possible to where the vxworks kernel resides. I have this need
because some third party libraries I link my downloadable against seem
not to have been compiled with the -mlongcall option; thus, when I load
my downloadable from the target shell I get the famous error
"Relocation value does not fit in 24 bits".
To solve the problem I tried the following:
1) Create a new memory partition with memPartCreate(0x4a0000,
0x4000000); the new memory partition begins at address 0x4a0000
(RAM_HIGH_ADRS) and is 64MB wide.
2) Use the loadModuleAt vxworks function, telling it to place the text
segment at 0x4a0000 and data and bss segments at LD_NO_ADDRESS (so they
should follow the text segment).
The loading of the module seems to work fine, but if I issue a
memPartShow command specifying the PART_ID of the above created
partition to see the status of the partition itself, the system
Another solution I've been told to use is to reduce the memory seen by
the operating system to 32MB (modifying the macro LOCAL_MEM_SIZE to
32MB), load all the modules, and then add the rest of the memory to the
system memory pool by using memAddToPool, but the problem with this
solution is that the size of my application is bigger than 32MB (there
are all the modules related to the X Window System that require much
Can you help me in some way to solve this problem?