1. Now I need to insert some data into a certain address of .text (code segment). For example, {'a','b','c','d','e','f','g','g'}
, the code used for
is char sgy_data2[32] __attribute__((section(".mysection1"))) = {'a','b','c','d','e','f','g','g
'};
The starting address of my .text segment is 0XFFFE8000, and then I want to write data at 0XFFFE8400 (the total length of .text is greater than 1024). What should I do?
2. If you have used E2 successfully, can you tell me how to set it up?
For E2:In order to have your data populated into your sections, you should take some additional steps. After adding the section, right click on it and add the following two expressions:
.section-name
.section-name.*
(GNU official explanation)
If you do not add the keep option, no matter how you define the variable, you should "use" this variable, otherwise the compiler will ignore this variable and will not write what you want to the bin file. required data.
As for other situations, it is similar.