Commit Graph

6 Commits

Author SHA1 Message Date
Ryan Macnak f925cd4422 [vm, elf] Speculatively align section header table.
Change-Id: Iec820e4fe0df691e914d593ffce13bcc8e5cddf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106485
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-06-18 22:04:29 +00:00
Ryan Macnak 6ab173a68d [vm, elf] Add a terminating DT_NULL to .dynamic.
gold appears to assume shared libraries have one, though it has no effect during loading.

Bug: b/135481201
Change-Id: I6da4f829d0ab9a8e6174ddd39db6c206794f8d4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106431
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-06-18 17:45:45 +00:00
Ryan Macnak 9ac3a733d2 [vm, elf] Eliminate diff of readelf -a between a binary that has and has not been processed by strip.
- Place program table in the first file page along with the ELF header, instead of a separate page.
 - Load program table into the first memory page, instead of after all other segments.
 - Place section table at the end, instead of after the program table.
 - Sort .hash .dynsym .dystr in the same order as strip.
 - Don't mark .shstrtab as allocated.
 - Populate unused physical address fields.

The issue on Android seems to be due to the program table placement.

Bug: https://github.com/flutter/flutter/issues/34308
Change-Id: I337dbdc76553e85eca7156256b97c99592011612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106440
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-06-18 17:34:25 +00:00
Ryan Macnak da0de06643 [vm] Use separate string tables for .dynstr and .shstrtab.
Android's strip incorrectly removes a single shared string table.

Bug: https://github.com/dart-lang/sdk/issues/37146
Change-Id: I744937041b71d5653b60a837917901c1d91bc361
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104643
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-06-04 16:58:01 +00:00
Ryan Macnak 0739387b05 [vm] Account for DBC32 when deciding between 32-bit and 64-bit ELF.
Change-Id: I1e8479927bf1f311c9500244f171eda46f105863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104180
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-29 23:59:12 +00:00
Ryan Macnak af93ebcf4c [vm] Direct generation of ELF shared libraries.
Change-Id: I41c9911f33490e504f4852f15695ca4c3f32a77f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/81323
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-05-28 18:48:57 +00:00