Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Test data for packing/unpacking. When compiled, creates a run of | |
| 6 // relative relocations. | |
| 7 // | |
| 8 // #!/bin/bash | |
| 9 // | |
| 10 // # Compile as an arm shared library. | |
| 11 // /usr/bin/arm-linux-gnueabi-g++ -shared -o /tmp/testdata.so \ | |
| 12 // elf_file_unittest_relocs.cc | |
| 13 // | |
| 14 // # Add a new null .android.rel.dyn section, needed for packing. | |
| 15 // echo 'NULL' >/tmp/small | |
| 16 // /usr/bin/arm-linux-gnueabi-objcopy \ | |
| 17 // --add-section .android.rel.dyn=/tmp/small /tmp/testdata.so | |
| 18 // | |
| 19 // # Create packed and unpacked reference files. | |
| 20 // packer="../../../out_android/Debug/relocation_packer" | |
| 21 // cp /tmp/testdata.so elf_file_unittest_relocs_packed.so | |
| 22 // $packer elf_file_unittest_relocs_packed.so | |
| 23 // cp elf_file_unittest_relocs_packed.so elf_file_unittest_relocs.so | |
| 24 // $packer -u elf_file_unittest_relocs.so | |
| 25 // | |
| 26 // # Clean up. | |
| 27 // rm /tmp/testdata.so /tmp/small | |
| 28 | |
|
rmcilroy
2014/06/07 11:49:07
Move this file out of src and into test_data along
simonb (inactive)
2014/06/09 14:39:19
Done.
| |
| 29 const int i = 0; | |
| 30 | |
| 31 const void* pointer_0 = &i; | |
| 32 const void* pointer_1 = &i; | |
| 33 const void* pointer_2 = &i; | |
| 34 const void* pointer_3 = &i; | |
| 35 const void* pointer_4 = &i; | |
| 36 const void* pointer_5 = &i; | |
| 37 const void* pointer_6 = &i; | |
| 38 const void* pointer_7 = &i; | |
| 39 const void* pointer_8 = &i; | |
| 40 const void* pointer_9 = &i; | |
| OLD | NEW |