[Lldb-commits] [PATCH] D16186: Unconditionally accept symbol sizes from .dynsym

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 14 10:24:24 PST 2016

tberghammer added a comment.

I looked through the sections we have in a striped elf file and non of them have any information what would tell us the start address of the functions (it isn't needed in runtime so it is removed to decrease the size).

Relocations won't really help because they will only reference the start of the public/global functions where we already have the start address from dynsym.

.eh_frame is a useful information source, but it isn't complete for several reasons. It is only present for non leaf functions (if the compiler is smart enough) and one eh_frame entry can belong to several functions (very common on arm where we use .ARM.exidx instead of .eh_frame). Currently if we don't have a symbol name for a function then we try to create a fake symbol for it based on the eh_frame but this is the behavior what is stopped by the extension of the 0 sized symbols because the symbol size extension will cover addresses where we originally didn't have any symbol. With leaving the 0 size symbols valid I would like to get this behavior back ti work (it works when the last symbol before the address had a non 0 size).

Do you remember what was the original reason for changing the size of the symbols from 0 to the address of the next symbol? I think it would be a good idea to completely remove that logic but I am not sure if it would break somebody or not.


More information about the lldb-commits mailing list