This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit fc89c8a
committed
Linker: clear error for incorrect page size load.
When the alignment of an ELF program is smaller than page size,
the program is malformed, and the linker will crash with an unclear
error:
dlopen failed: empty/missing DT_HASH/DT_GNU_HASH
Now, we explicitly check the alignment, only on >= 16KB page size
machines, so we get a clearer error:
Test: e.g.:
dlopen failed: "/data/local/tmp/bionic-unit-tests/x86_64/bionic-loader-test-libs/prebuilt-elf-files/libtest_invalid-rw_load_segment.so" program alignment (4096) cannot be smaller than system page size (16384)
Bug: 342480592
Change-Id: I2fa50c0d8cca34acde03d71d8dc600dc3858ca041 parent 5530c8e commit fc89c8a
2 files changed
+35
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
572 | | - | |
| 570 | + | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
| |||
579 | 577 | | |
580 | 578 | | |
581 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
582 | 604 | | |
583 | 605 | | |
584 | 606 | | |
| |||
830 | 852 | | |
831 | 853 | | |
832 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
833 | 864 | | |
834 | 865 | | |
835 | 866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments