[llvm-commits] Fix for ArchiveReader

Rafael Avila de Espindola rafael.espindola at gmail.com
Fri Mar 11 08:42:40 PST 2011

On 11-03-04 10:26 AM, Joe Abbey wrote:

> The defect is the 'offset' value saved to the 'modules' map. The
> 'modules' map should store the physical file offset of the loaded
> module (which is "offset + firstFileOffset", instead of the "offset"),
> the distance of the loaded module member from the first member in the
> archive file.

A testcase would be nice. The archive files that llvm produces are a bit 
funny, if I remember correctly they have both a regular symbol table and 
a table of the IL. I assume the problem you found is while reading an 
archive produced by 'ar rc' (without the s). If this fixes it, it is 
fine. Can you use the system ar + llvm-nm to produce a test?

> Cheers,
> Joe


More information about the llvm-commits mailing list