diff options
author | Elliott Hughes <enh@google.com> | 2020-07-21 16:11:30 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2020-07-21 16:34:58 -0700 |
commit | 68ae6ad12e4f89526638f167c380d0b28b3bdeac (patch) | |
tree | e18075751c1f0d08d94d7c6be14e1a18b560b285 /linker | |
parent | c79ea239415963d4a38752d0f3efe50531c8e04f (diff) | |
download | bionic-68ae6ad12e4f89526638f167c380d0b28b3bdeac.tar.gz |
Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
Diffstat (limited to 'linker')
-rw-r--r-- | linker/linker.cpp | 2 | ||||
-rw-r--r-- | linker/linker_block_allocator_test.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index a41ca091b..7cfe87be7 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -3168,7 +3168,7 @@ bool soinfo::prelink_image() { DEBUG("si->base = %p, si->strtab = %p, si->symtab = %p", reinterpret_cast<void*>(base), strtab_, symtab_); - // Sanity checks. + // Validity checks. if (relocating_linker && needed_count != 0) { DL_ERR("linker cannot have DT_NEEDED dependencies on other libraries"); return false; diff --git a/linker/linker_block_allocator_test.cpp b/linker/linker_block_allocator_test.cpp index 359eefbab..6fb2b2680 100644 --- a/linker/linker_block_allocator_test.cpp +++ b/linker/linker_block_allocator_test.cpp @@ -47,14 +47,14 @@ struct test_struct_nominal { * this one has size below allocator cap which is 2*sizeof(void*) */ struct test_struct_small { - char dummy_str[5]; + char str[5]; }; /* * 1009 byte struct (1009 is prime) */ struct test_struct_larger { - char dummy_str[1009]; + char str[1009]; }; static size_t kPageSize = sysconf(_SC_PAGE_SIZE); @@ -131,14 +131,14 @@ static void protect_all() { allocator.protect_all(PROT_READ); allocator.protect_all(PROT_READ | PROT_WRITE); // check access - page2_ptr->dummy_str[23] = 27; - page1_ptr->dummy_str[13] = 11; + page2_ptr->str[23] = 27; + page1_ptr->str[13] = 11; allocator.protect_all(PROT_READ); fprintf(stderr, "trying to access protected page"); // this should result in segmentation fault - page1_ptr->dummy_str[11] = 7; + page1_ptr->str[11] = 7; } TEST(linker_allocator, test_protect) { |