Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Side by Side Diff: tools/relocation_packer/src/relocation_packer_elf_file_unittest_relocs.cc

Issue 310483003: Add a host tool to pack R_ARM_RELATIVE relocations in libchrome.<ver>.so. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 short vtable
6 // that is represented as relative relocations in a shared library.
7 //
8 // #!/bin/bash
9 // # Compile as an arm shared library.
10 // /usr/bin/arm-linux-gnueabi-g++ -shared -o \
11 // relocation_packer_elf_file_unittest_relocs.so \
12 // relocation_packer_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 \
18 // relocation_packer_elf_file_unittest_relocs.so
19 //
20 // # Convert into C/C++ include file style for unit testing convenience.
21 // /usr/bin/xxd -i relocation_packer_elf_file_unittest_relocs.so \
22 // > relocation_packer_elf_file_unittest_relocs.so.h
23 //
24 // # Cleanup.
25 // rm relocation_packer_elf_file_unittest_relocs.so
26
27 struct Foo {
rmcilroy 2014/06/02 15:16:35 How about putting this in a data directory (along
28 virtual int f1(); virtual int f2();
29 };
30 struct Bar : Foo {
31 int f1() { return 1; };
32 int f2() { return 2; };
33 };
34 void Bas() {
35 Bar bar; bar.f1(); bar.f2();
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698