[llvm-commits] [patch] Use mmap to map archive members

Rafael Avila de Espindola rafael.espindola at gmail.com
Thu Mar 10 11:07:38 PST 2011


The attached patch changes lto_module_create_from_fd to also take a 
map_size and an offset. With this change the gold plugin can then mmap 
archive members.

Hopefully this change is OK since lto_module_create_from_fd is a new 
function, but there is the question of what to do with 2.9. I think the 
options are

*) Change the signature in 2.9 too but require that offset == 0 and 
map_size == file_size.

*) Don't change lto_module_create_from_fd and instead add a 
lto_module_create_from_fd_at_offset

*) Accept that 3.0 will have a backward incompatible API for 
lto_module_create_from_fd.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto.patch
Type: text/x-patch
Size: 5060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110310/3743ef3d/attachment.bin>


More information about the llvm-commits mailing list