This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I have a question related objcopy tool. I have the ELF object file 'object', and I want to update the data of one section (assume '.mysec'). Is there any possibility to re-compute start, VMA and LMA addresses of all sections which are placed below '.mysec'?
Now, I do it manually in this way:
Remove the current section: objcopy object -R .mysec
Add new section and fill it with data of mysec_data file objcopy object --add-section .mysec=mysec_data
Change the section flags objcopy object --set-section flags .mysec=contents,alloc,load,readonly,data
Set a new VMA and LMA values objcopy vmlinux --change-section-vma .mysec=0x80b9b000
And then I change the addresses of .machvec.init and .bss sections to fit the new memory arrangement.
Do you know any tips of hints to do it automatically instead of annoying computing and changing it step by step?
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |