[PATCH] D27931: Fix corner cases of setting the section address
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 10:18:40 PST 2016
rafael created this revision.
rafael added reviewers: ruiu, georgerim.
rafael added a subscriber: llvm-commits.
Herald added a subscriber: emaste.
This is based on and an alternative to https://reviews.llvm.org/D27613.
It handles all the corner cases if setting a section address:
- If the address is too low, we cannot allocate the program headers.
- If the load address is lowered, we have to do that before finalize
This also shares some code with the linker script since it was already hitting similar cases.
This is used by the freebsd boot loader. It is not clear if we need to support this with a non binary output, but it is not as bad as I was expecting.
https://reviews.llvm.org/D27931
Files:
lld/ELF/LinkerScript.cpp
lld/ELF/Writer.cpp
lld/ELF/Writer.h
lld/test/ELF/ttext-tdata-tbss.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27931.81971.patch
Type: text/x-patch
Size: 10589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161219/b53a6353/attachment.bin>
More information about the llvm-commits
mailing list