<div dir="ltr">hi,<div style>Now I have a idea about how to include local symbols in the RAP file, and try to not increase the size of the RAP file.</div><div style><br></div><div style>1. About the relocations.</div><div style>
The current layout for the relocations is:</div><div style>| header | reloc entries|</div><div style>the first bit of header indicates whether it is rela or not. the remaining 30 bits indicates the number of reloc entries.</div>
<div style><br></div><div style>But now I want to include elf object index for reloc entries and symbols to resolve conflicting local symbols. For example two objects both contains the ".LC0" symbols, how to figure out which ".LC0" symbol is needed for the reloc entry.</div>
<div style><br></div><div style>I want to use the following layout for reloc part of RAP file .</div><div style><br></div><div style>| header | counts(object 1) | reloc entries | counts(object 2) | reloc entries .....</div>
<div style><br></div><div style>The header still contains the total number of reloc entries just like the current implementation.</div><div style> </div><div style>2. About the local symbols.</div><div style>Now there is a 'symtab_size' variable to indicates how many global symbols are in the rap file.</div>
<div style>Because I want to include local symbols, I want to add a local symbol table after the global symbol table.</div><div style>| global_symtab_size | local_symtab_size | .......</div><div style>| global symbol table </div>
<div style>| object1 local_symtab_size | object1 local symbol table </div><div style>| object2 local_symtab_size| object2 local symbol table | ....</div><div style><br></div><div style>My current implementation is each reloc entry contains an object index and each symbol contains an object index. But this may consume more space, I prepare to rewrite this using 1 and 2.</div>
<div style>However I am not sure whether this is ok. </div><div style><br></div><div style><br></div></div>