partial c++ code binary update on embedded target
nick clifton
nickc@redhat.com
Thu Aug 22 15:19:00 GMT 2013
Hi Riccardo,
> 2) If I place all the .data, .bss and .text into a unique section, is
> there a way to identify those parts of the library that are read/write
> and need to be copied in RAM at startup?
Yes - use multiple unique sections... Map the .text sections into one
specific, unique output section, the .data sections into another and so on.
> My answer to these two points is to use a linkerscript similar to the
> following:
Right - this is the way to do it.
> Is this solution applicable? Is there a better one than writing each
> single file of the library in the linkerscript (I feel really bad doing
> this)?
So use wildcards. For example if you have all of the fixed parts of the
application in one directory and all of the upgradeable parts in another
directory then your script could look like this:
.dll_rom : { upgradeable/*(.text) } >rom
.text : { fixed/*(.text) }
.dll_ram : { upgradeable/*(.data) } >ram AT>rom
.data : { fixed/*(.data) }
Cheers
Nick
More information about the Binutils
mailing list