forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "[Fuchsia] Use memory offsets instead of file offsets for ELF …
…headers." This is a reland of 224e8c2 The previous CL broke on ChromeOS test bots. This reland CL adds the following fixes: * Enable the ReadElfLibraryName unit test on Fuchsia. * Read ELF data from the linked module's memory instead of from the filesystem directly, so that p_vaddr is valid. * Switch to interpreting SYMTAB pointers as offsets instead of memory addresses under Fuchsia and Android, which use -fPIE executables. * Modify test code to query for the exported MallocWrapper() symbol. The previous implementation queried for "_init", which doesn't exist for built Fuchsia shared libraries. Original change's description: > [Fuchsia] Use memory offsets instead of file offsets for ELF headers. > > The ELF reader code uses file offsets for computing locations of data > in ELF headers. It is technically incorrect but generally works on > Intel without problems. However, ARM has wider alignment boundaries > which results in the computation and access of incorrect memory > addresses, producing page faults in certain circumstances. > > The bug is fixed by using p_vaddr instead of p_offset. > > Bug: 941279 > Change-Id: Ia88dc58411dfe046f882a94cea0e80e8ec525957 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1518226 > Reviewed-by: Wez <wez@chromium.org> > Commit-Queue: Kevin Marshall <kmarshall@chromium.org> > Cr-Commit-Position: refs/heads/master@{#640165} Bug: 941279 Change-Id: Id17ce92eeb0e97114b0b131ab746b4a4a15be36e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520209 Reviewed-by: Wez <wez@chromium.org> Commit-Queue: Wez <wez@chromium.org> Commit-Queue: Kevin Marshall <kmarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#643524}
- Loading branch information
Kevin Marshall
authored and
Commit Bot
committed
Mar 22, 2019
1 parent
23cde2a
commit c26b4a5
Showing
5 changed files
with
37 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters