X-Git-Url: https://git.lttng.org/?p=lttng-ust.git;a=blobdiff_plain;f=tests%2Funit%2Fust-elf%2FREADME.md;fp=tests%2Funit%2Fust-elf%2FREADME.md;h=fc90157ed29e8dca0866124251632a527fe231fe;hp=0091876fe8ea3b0361f231daed8c9aff2955ea1e;hb=e03d7c66c57bf268b87296566a5160039f35ccfb;hpb=79f8dc6f50b20fb6b1d99f9bd97d70aa361bc6ad diff --git a/tests/unit/ust-elf/README.md b/tests/unit/ust-elf/README.md index 0091876f..fc90157e 100644 --- a/tests/unit/ust-elf/README.md +++ b/tests/unit/ust-elf/README.md @@ -1,5 +1,10 @@ -lttng_ust_elf unit tests -======================== + + +# lttng\_ust\_elf unit tests This is a series of unit tests for LTTng UST's ELF parser. The parser is used to retrieve memory size, build ID, and debug link information @@ -14,9 +19,9 @@ architectures representing all combinations of bitness and endianness are currently tested: * x86 -* x86_64 +* x86\_64 * armeb -* aarch64_be +* aarch64\_be For each architecture, there is a corresponding subdirectory under `data`, and each of these directories contains exactly 2 files, @@ -37,9 +42,11 @@ The debug information bundled in `main.elf` is then copied into `main.elf.debug` and stripped, and a debug link pointing to this file is added to the executable. The commands used are as follow: - $ objcopy --only-keep-debug main.elf main.elf.debug - $ strip -g main.elf - $ objcopy --add-gnu-debuglink=main.elf.debug main.elf +``` +$ objcopy --only-keep-debug main.elf main.elf.debug +$ strip -g main.elf +$ objcopy --add-gnu-debuglink=main.elf.debug main.elf +``` There is also a series of tests used to check detection of position-independent code (PIC). These tests use three pre-compiled @@ -47,6 +54,8 @@ ELF files found under `data/pic/`, namely `hello.exec`, `hello.pie`, and `hello.pic`. These can be re-generated using the files `hello.c` and `libhello.c`, with the following commands: - $ gcc hello.c -o hello.exec - $ gcc hello.c -fPIC -pie -o hello.pie - $ gcc -shared -o hello.pic -fPIC libhello.c +``` +$ gcc hello.c -o hello.exec +$ gcc hello.c -fPIC -pie -o hello.pie +$ gcc -shared -o hello.pic -fPIC libhello.c +```