local symbols problem for RTL

Peng Fan van.freenix at gmail.com
Thu May 30 08:07:22 UTC 2013


hi,
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.

1. About the relocations.
The current layout for the relocations  is:
| header | reloc entries|
the first bit of header indicates whether it is rela or not. the remaining
30 bits indicates the number of reloc entries.

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.

I want to use the following layout for reloc part of RAP file .

| header | counts(object 1) | reloc entries | counts(object 2) | reloc
entries .....

The header still contains the total number of reloc entries just like the
current implementation.

2. About the local symbols.
Now there is a 'symtab_size' variable to indicates how many global symbols
are in the rap file.
Because I want to include local symbols, I want to add a local symbol table
after the global symbol table.
| global_symtab_size | local_symtab_size | .......
| global symbol table
| object1 local_symtab_size | object1 local symbol table
| object2 local_symtab_size| object2 local symbol table | ....

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.
However I am not sure whether this is ok.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130530/cb8f4aaf/attachment.html>


More information about the devel mailing list