| 1 | The files in here are used for the sysroot-resolve auto test |
| 2 | |
| 3 | - libtestlib.so is copied over directly to the path from my system |
| 4 | this allows us to test resolving via `--sysroot` |
| 5 | - test_lib is put into another folder |
| 6 | this allows us to test the `--extra-paths` feature |
| 7 | - then the debug info for a system lib referenced by the |
| 8 | executable is copied to various places to test that finding |
| 9 | them with the default path as well as the `--debug-paths` feature. |
| 10 | These files get the `.debug` suffix too. |
| 11 | |
| 12 | All files are stripped for safety purposes and since we don't |
| 13 | need the executable code anyhow for symbolication: |
| 14 | |
| 15 | strip --only-keep-debug ... |
| 16 | |
| 17 | For libc, we want to test debuglink resolution. The original file is copied over via: |
| 18 | |
| 19 | objcopy /usr/lib/libc.so.6 -R .text -R .note.stapsdt -R .bss -R .data -R .data.rel.ro -R .rodata libc.so.6 |
| 20 | |
| 21 | The debug file is then looked up via: |
| 22 | |
| 23 | debuginfod-find debuginfo /usr/lib/libc.so.6 |
| 24 | /home/milian/.cache/debuginfod_client/32a656aa5562eece8c59a585f5eacd6cf5e2307b/debuginfo |
| 25 | |
| 26 | This file is then copied to a place matching the layout of a `.debug` folder, in our case: |
| 27 | |
| 28 | .build-id/32/a656aa5562eece8c59a585f5eacd6cf5e2307b.debug |
| 29 | |
| 30 | The `heaptrack.test_sysroot.raw` is manually reduced to not reference any extra files that |
| 31 | are not important for the sake of this test here. |