This PR adds symbol table for
- ELF & MachO object files
- in GNU, GNU64, Thin, BSD and Darwin64 format
- s and S modifiers
- (includes code from zld)
This PR adds symbol table for
As I mentioned yesterday in #14(comment), the current way of parsing symbols is prone to modification errors. But its even more difficult to solve. Symbol table is parsed before files are parsed, why is why its not that easy to assign symbols to their respective files.
Solutions:
Don't parse symbol table at all, only validate it. Then later regenerate the symbols from the file contents. This is something more doable in the long term but needs upstream support from zld (see here)
Parse symbol table but store everything in a local array. Then when files are parsed, calculate its offset from the beginning of the archive. If archive offset == symbol's offset, then this symbol belongs to current active file. This one is easier and simpler for now.
Now I think, it would make sense to solve this outside of this PR as there is no conflict. Just need agreement on the solution or other ideas on it.
I will have a look this evening - I think I have an idea for a cleaner solution so will give that a try then.
I've created PR #26 which might help? Feel free to merge if its something along the right lines for this. :)
Ahh that's better. It should do it. I will make the changes to this later along with merging #26
Thanks.
Success 🎉
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?