Issue metadata
Sign in to add a comment
|
Issue compiling / linking sys-process/criu with clang |
||||||||||||||||||||||||
Issue descriptionI am trying to add the criu package to the chromeos build - it is a requirement for lxc snapshots which are used in moblab. Project homepage https://criu.org/Main_Page I can get it to work with gcc but when I use clang I get an error. CL https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1041156 Steps to reproduce git fetch https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay refs/changes/56/1041156/5 && git cherry-pick -n FETCH_HEAD emerge-guado_moblab sys-process/criu Error: ./compel/compel-host hgen -f criu/pie/restorer.built-in.o -o criu/pie/restorer-blob.h Error (compel/src/lib/handle-elf-host.c:333): Unexpected undefined symbol: `'. External symbol in PIE? Running that command with verbose logging I get : ./compel/compel-host -l 9 hgen -f criu/pie/restorer.built-in.o -o criu/pie/restorer-blob.h Header ------------ type 0x1 machine 0x3e version 0x1 Sections ------------ index 0 type 0x0 name index 1 type 0x1 name .text index 2 type 0x1 name .rodata index 3 type 0x8 name .data index 4 type 0x4 name .rela.text index 5 type 0x4 name .rela.data index 6 type 0x4 name .rela.rodata index 7 type 0x1 name .note.GNU-stack index 8 type 0x2 name .symtab index 9 type 0x3 name .strtab index 10 type 0x3 name .shstrtab Symbols ------------ type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name restorer.c type 0x1 bind 0x0 shndx 0x2 value 0x0 name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x18 name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x145 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x23 name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x2a name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x3b name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x4c name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x8b name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0xa4 name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0xe4 name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0x122 name .L.str.9 type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name sigaction_compat_pie.c type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name restorer.c type 0x1 bind 0x0 shndx 0x2 value 0x180 name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x1aa name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x2c5 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x2f8 name .L.str.11 type 0x1 bind 0x0 shndx 0x2 value 0x314 name .L.str.12 type 0x1 bind 0x0 shndx 0x2 value 0x33f name .L.str.13 type 0x1 bind 0x0 shndx 0x2 value 0x350 name .L.str.14 type 0x1 bind 0x0 shndx 0x2 value 0x364 name .L.str.15 type 0x1 bind 0x0 shndx 0x2 value 0x39b name .L.str.16 type 0x1 bind 0x0 shndx 0x2 value 0x3c5 name .L.str.17 type 0x1 bind 0x0 shndx 0x2 value 0x408 name .L.str.18 type 0x1 bind 0x0 shndx 0x2 value 0x41f name .L.str.19 type 0x1 bind 0x0 shndx 0x2 value 0x1be name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x449 name .L.str.20 type 0x1 bind 0x0 shndx 0x2 value 0x470 name .L.str.21 type 0x1 bind 0x0 shndx 0x2 value 0x49a name .L.str.22 type 0x1 bind 0x0 shndx 0x2 value 0x4c4 name .L.str.23 type 0x1 bind 0x0 shndx 0x2 value 0x4f3 name .L.str.24 type 0x1 bind 0x0 shndx 0x2 value 0x51d name .L.str.25 type 0x1 bind 0x0 shndx 0x2 value 0x549 name .L.str.26 type 0x1 bind 0x0 shndx 0x2 value 0x587 name .L.str.27 type 0x1 bind 0x0 shndx 0x2 value 0x5aa name .L.str.28 type 0x1 bind 0x0 shndx 0x2 value 0x5c7 name .L.str.29 type 0x1 bind 0x0 shndx 0x2 value 0x1e9 name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x5e9 name .L.str.30 type 0x1 bind 0x0 shndx 0x2 value 0x61b name .L.str.31 type 0x1 bind 0x0 shndx 0x2 value 0x653 name .L.str.32 type 0x1 bind 0x0 shndx 0x2 value 0x678 name .L.str.33 type 0x1 bind 0x0 shndx 0x2 value 0x6b0 name .L.str.34 type 0x1 bind 0x0 shndx 0x2 value 0x6e9 name .L.str.35 type 0x1 bind 0x0 shndx 0x2 value 0x72d name .L.str.36 type 0x1 bind 0x0 shndx 0x2 value 0x751 name .L.str.37 type 0x1 bind 0x0 shndx 0x2 value 0x796 name .L.str.38 type 0x1 bind 0x0 shndx 0x2 value 0x7ba name .L.str.39 type 0x1 bind 0x0 shndx 0x2 value 0x1f8 name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x7ee name .L.str.40 type 0x1 bind 0x0 shndx 0x2 value 0x81f name .L.str.41 type 0x1 bind 0x0 shndx 0x2 value 0x852 name .L.str.42 type 0x1 bind 0x0 shndx 0x2 value 0x86c name .L.str.43 type 0x1 bind 0x0 shndx 0x2 value 0x887 name .L.str.44 type 0x1 bind 0x0 shndx 0x2 value 0x8a8 name .L.str.45 type 0x1 bind 0x0 shndx 0x2 value 0x8d3 name .L.str.46 type 0x1 bind 0x0 shndx 0x2 value 0x90b name .L.str.47 type 0x1 bind 0x0 shndx 0x2 value 0x93d name .L.str.48 type 0x1 bind 0x0 shndx 0x2 value 0x9ad name .L.str.49 type 0x1 bind 0x0 shndx 0x2 value 0x21b name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x9c9 name .L.str.50 type 0x1 bind 0x0 shndx 0x2 value 0xa59 name .L.str.56 type 0x1 bind 0x0 shndx 0x2 value 0xa6a name .L.str.57 type 0x1 bind 0x0 shndx 0x2 value 0xa79 name .L.str.58 type 0x1 bind 0x0 shndx 0x2 value 0xaa5 name .L.str.59 type 0x1 bind 0x0 shndx 0x2 value 0x251 name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0xabd name .L.str.60 type 0x1 bind 0x0 shndx 0x2 value 0xaf2 name .L.str.61 type 0x1 bind 0x0 shndx 0x2 value 0xb21 name .L.str.62 type 0x1 bind 0x0 shndx 0x2 value 0xb52 name .L.str.63 type 0x1 bind 0x0 shndx 0x2 value 0xb7d name .L.str.64 type 0x1 bind 0x0 shndx 0x2 value 0xba1 name .L.str.65 type 0x1 bind 0x0 shndx 0x2 value 0xbda name .L.str.66 type 0x1 bind 0x0 shndx 0x2 value 0xc24 name .L.str.67 type 0x1 bind 0x0 shndx 0x2 value 0xc41 name .L.str.68 type 0x1 bind 0x0 shndx 0x2 value 0xc5e name .L.str.69 type 0x1 bind 0x0 shndx 0x2 value 0x26e name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0xc88 name .L.str.70 type 0x1 bind 0x0 shndx 0x2 value 0xcd8 name .L.str.71 type 0x1 bind 0x0 shndx 0x2 value 0xce2 name .L.str.72 type 0x1 bind 0x0 shndx 0x2 value 0xd0f name .L.str.73 type 0x1 bind 0x0 shndx 0x2 value 0xd3e name .L.str.74 type 0x1 bind 0x0 shndx 0x2 value 0xd6d name .L.str.75 type 0x1 bind 0x0 shndx 0x2 value 0xd98 name .L.str.76 type 0x1 bind 0x0 shndx 0x2 value 0xdac name .L.str.77 type 0x1 bind 0x0 shndx 0x2 value 0xdd8 name .L.str.78 type 0x1 bind 0x0 shndx 0x2 value 0xe06 name .L.str.79 type 0x1 bind 0x0 shndx 0x2 value 0x283 name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0xe3e name .L.str.80 type 0x1 bind 0x0 shndx 0x2 value 0xe87 name .L.str.81 type 0x1 bind 0x0 shndx 0x2 value 0xea4 name .L.str.82 type 0x1 bind 0x0 shndx 0x2 value 0xecb name .L.str.83 type 0x1 bind 0x0 shndx 0x2 value 0xf06 name .L.str.84 type 0x1 bind 0x0 shndx 0x2 value 0xf40 name .L.str.85 type 0x1 bind 0x0 shndx 0x2 value 0xf75 name .L.str.86 type 0x1 bind 0x0 shndx 0x2 value 0xfa2 name .L.str.87 type 0x1 bind 0x0 shndx 0x2 value 0xe4 name .L.str.88 type 0x1 bind 0x0 shndx 0x2 value 0x122 name .L.str.89 type 0x1 bind 0x0 shndx 0x2 value 0x2a8 name .L.str.9 type 0x1 bind 0x0 shndx 0x2 value 0x145 name .L.str.90 type 0x1 bind 0x0 shndx 0x2 value 0xfc5 name .L.str.91 type 0x1 bind 0x0 shndx 0x2 value 0xff0 name .L.str.92 type 0x1 bind 0x0 shndx 0x2 value 0x1031 name .L.str.93 type 0x1 bind 0x0 shndx 0x2 value 0x106e name .L.str.94 type 0x1 bind 0x0 shndx 0x2 value 0x1085 name .L.str.95 type 0x1 bind 0x0 shndx 0x2 value 0x10cc name .L.str.96 type 0x1 bind 0x0 shndx 0x2 value 0x1808 name .Lwait_zombies.to type 0x0 bind 0x0 shndx 0x1 value 0x2445 name clone_emul type 0x0 bind 0x0 shndx 0x1 value 0x2497 name clone_end type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9368 name fi_strategy type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9398 name helpers type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93a0 name n_helpers type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93b0 name n_zombies type 0x2 bind 0x0 shndx 0x1 value 0x9b0 name restore_creds type 0x2 bind 0x0 shndx 0x1 value 0xd70 name restore_dumpable_flag type 0x2 bind 0x0 shndx 0x1 value 0xe90 name restore_signals type 0x2 bind 0x0 shndx 0x1 value 0x8b0 name restore_thread_common type 0x2 bind 0x0 shndx 0x1 value 0xf70 name rst_sigreturn type 0x2 bind 0x0 shndx 0x1 value 0x3280 name sigchld_handler type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9370 name task_entries_local type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9378 name thread_inprogress type 0x0 bind 0x0 shndx 0x1 value 0x2490 name thread_run type 0x2 bind 0x0 shndx 0x1 value 0x3380 name vma_remap type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93a8 name zombies type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name parasite-vdso.c type 0x1 bind 0x0 shndx 0x2 value 0x10f6 name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x1119 name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x1249 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x127b name .L.str.11 type 0x1 bind 0x0 shndx 0x2 value 0x12ad name .L.str.12 type 0x1 bind 0x0 shndx 0x2 value 0x12e3 name .L.str.13 type 0x1 bind 0x0 shndx 0x2 value 0x1132 name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x113a name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x1142 name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x1163 name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x1197 name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0x11c2 name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0x11dd name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0x1212 name .L.str.9 type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name vdso-pie.c type 0x1 bind 0x0 shndx 0x2 value 0x131b name .L.str type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name util-vdso-elf32.c type 0x1 bind 0x0 shndx 0x2 value 0x1345 name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x135f name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x14d2 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x14e8 name .L.str.11 type 0x1 bind 0x0 shndx 0x2 value 0x14fd name .L.str.12 type 0x1 bind 0x0 shndx 0x2 value 0x1513 name .L.str.13 type 0x1 bind 0x0 shndx 0x2 value 0x1527 name .L.str.14 type 0x1 bind 0x0 shndx 0x2 value 0x1561 name .L.str.15 type 0x1 bind 0x0 shndx 0x2 value 0x13a0 name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x1613 name .L.str.23 type 0x1 bind 0x0 shndx 0x2 value 0x13bb name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x13d7 name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x1408 name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x1437 name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0x1463 name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0x148c name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0x14bc name .L.str.9 type 0x1 bind 0x0 shndx 0x2 value 0xffffffffffffab00 name has_elf_identity.elf_ident type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name util-vdso.c type 0x1 bind 0x0 shndx 0x2 value 0x1345 name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x135f name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x14d2 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x14e8 name .L.str.11 type 0x1 bind 0x0 shndx 0x2 value 0x14fd name .L.str.12 type 0x1 bind 0x0 shndx 0x2 value 0x1513 name .L.str.13 type 0x1 bind 0x0 shndx 0x2 value 0x1527 name .L.str.14 type 0x1 bind 0x0 shndx 0x2 value 0x1561 name .L.str.15 type 0x1 bind 0x0 shndx 0x2 value 0x1646 name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x1613 name .L.str.23 type 0x1 bind 0x0 shndx 0x2 value 0x13bb name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x13d7 name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x1408 name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x1437 name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0x1463 name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0x148c name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0x14bc name .L.str.9 type 0x1 bind 0x0 shndx 0x2 value 0xffffffffffffab40 name has_elf_identity.elf_ident type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name log.c type 0x1 bind 0x0 shndx 0x2 value 0x165b name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x166b name .L.str.1 type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff935c name cur_loglevel type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9358 name logfd type 0x2 bind 0x0 shndx 0x1 value 0x5720 name print_hex_l type 0x2 bind 0x0 shndx 0x1 value 0x5600 name sbuf_log_flush type 0x2 bind 0x0 shndx 0x1 value 0x4fe0 name sbuf_printf type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93b8 name start type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name string.c type 0x1 bind 0x0 shndx 0x2 value 0x1a30 name conv_tab type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name infect.c type 0x1 bind 0x0 shndx 0x2 value 0x167c name .L.str type 0x1 bind 0x0 shndx 0x2 value 0x169a name .L.str.1 type 0x1 bind 0x0 shndx 0x2 value 0x1794 name .L.str.10 type 0x1 bind 0x0 shndx 0x2 value 0x17ae name .L.str.11 type 0x1 bind 0x0 shndx 0x2 value 0x17d0 name .L.str.12 type 0x1 bind 0x0 shndx 0x2 value 0x17e9 name .L.str.13 type 0x1 bind 0x0 shndx 0x2 value 0x16ac name .L.str.2 type 0x1 bind 0x0 shndx 0x2 value 0x16d2 name .L.str.3 type 0x1 bind 0x0 shndx 0x2 value 0x16eb name .L.str.4 type 0x1 bind 0x0 shndx 0x2 value 0x170d name .L.str.5 type 0x1 bind 0x0 shndx 0x2 value 0x171b name .L.str.6 type 0x1 bind 0x0 shndx 0x2 value 0x1737 name .L.str.7 type 0x1 bind 0x0 shndx 0x2 value 0x1753 name .L.str.8 type 0x1 bind 0x0 shndx 0x2 value 0x177a name .L.str.9 type 0x2 bind 0x0 shndx 0x1 value 0x66c0 name fini type 0x2 bind 0x0 shndx 0x1 value 0x6900 name fini_sigreturn type 0x2 bind 0x0 shndx 0x1 value 0x64b0 name parasite_daemon type 0x2 bind 0x0 shndx 0x1 value 0x6770 name parasite_init_daemon type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93c8 name sigframe type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff9360 name tsock type 0x4 bind 0x0 shndx 0xfff1 value 0x0 name fds.c type 0x1 bind 0x0 shndx 0x3 value 0xffffffffffff93d0 name scm_fdset_init_chunk.dummy type 0x2 bind 0x1 shndx 0x1 value 0x60 name arch_map_vdso type 0x2 bind 0x1 shndx 0x1 value 0x4be0 name print_on_level type 0x2 bind 0x1 shndx 0x1 value 0xb0 name restore_nonsigframe_gpregs type 0x2 bind 0x1 shndx 0x1 value 0x150 name restore_tls type 0x2 bind 0x1 shndx 0x1 value 0x110 name set_compat_robust_list type 0x2 bind 0x1 shndx 0x1 value 0x62d4 name sys_arch_prctl type 0x2 bind 0x1 shndx 0x1 value 0x603c name sys_mmap type 0x2 bind 0x1 shndx 0x1 value 0x604c name sys_munmap type 0x2 bind 0x1 shndx 0x1 value 0x3c0 name call32_from_64 type 0x2 bind 0x1 shndx 0x1 value 0x414 name __export_unmap_compat type 0x1 bind 0x1 shndx 0x3 value 0xe0 name bootstrap_len type 0x1 bind 0x1 shndx 0x3 value 0xd8 name bootstrap_start type 0x1 bind 0x1 shndx 0x3 value 0xd0 name vdso_rt_size type 0x2 bind 0x1 shndx 0x1 value 0x440 name arch_compat_rt_sigaction type 0x0 bind 0x1 shndx 0x1 value 0x430 name restore_rt_sigaction type 0x2 bind 0x1 shndx 0x1 value 0x6008 name __cr_restore_rt type 0x2 bind 0x1 shndx 0x1 value 0xfd0 name __export_restore_task type 0x2 bind 0x1 shndx 0x1 value 0x4d0 name __export_restore_thread type 0x2 bind 0x1 shndx 0x1 value 0xfb0 name __export_unmap type 0x1 bind 0x1 shndx 0xfff2 value 0x8 name __packed type 0x2 bind 0x1 shndx 0x1 value 0x3600 name __stack_chk_fail type 0x2 bind 0x1 shndx 0x1 value 0xfa0 name arch_shmat type 0x2 bind 0x1 shndx 0x1 value 0x480 name fault_injected type 0x2 bind 0x1 shndx 0x1 value 0x5fe8 name memcpy type 0x2 bind 0x1 shndx 0x1 value 0x4c0 name parasite_cleanup type 0x2 bind 0x1 shndx 0x1 value 0x4a0 name parasite_daemon_cmd type 0x2 bind 0x1 shndx 0x1 value 0x4b0 name parasite_trap_cmd type 0x2 bind 0x1 shndx 0x1 value 0x4b20 name std_log_set_fd type 0x2 bind 0x1 shndx 0x1 value 0x4b40 name std_log_set_loglevel type 0x2 bind 0x1 shndx 0x1 value 0x4b50 name std_log_set_start type 0x2 bind 0x1 shndx 0x1 value 0x5640 name std_sprintf type 0x2 bind 0x1 shndx 0x1 value 0x4b60 name std_vprint_num type 0x2 bind 0x1 shndx 0x1 value 0x6280 name sys_capset type 0x2 bind 0x1 shndx 0x1 value 0x63ac name sys_clock_gettime type 0x2 bind 0x1 shndx 0x1 value 0x602c name sys_close type 0x2 bind 0x1 shndx 0x1 value 0x63b8 name sys_exit_group type 0x2 bind 0x1 shndx 0x1 value 0x61a8 name sys_flock type 0x2 bind 0x1 shndx 0x1 value 0x6310 name sys_futex type 0x2 bind 0x1 shndx 0x1 value 0x60e8 name sys_getpid type 0x2 bind 0x1 shndx 0x1 value 0x6304 name sys_gettid type 0x2 bind 0x1 shndx 0x1 value 0x6328 name sys_io_setup type 0x2 bind 0x1 shndx 0x1 value 0x6340 name sys_io_submit type 0x2 bind 0x1 shndx 0x1 value 0x6074 name sys_ioctl type 0x2 bind 0x1 shndx 0x1 value 0x6190 name sys_kill type 0x2 bind 0x1 shndx 0x1 value 0x6034 name sys_lseek type 0x2 bind 0x1 shndx 0x1 value 0x60a0 name sys_madvise type 0x2 bind 0x1 shndx 0x1 value 0x6044 name sys_mprotect type 0x2 bind 0x1 shndx 0x1 value 0x6088 name sys_mremap type 0x2 bind 0x1 shndx 0x1 value 0x6024 name sys_open type 0x2 bind 0x1 shndx 0x1 value 0x63c4 name sys_openat type 0x2 bind 0x1 shndx 0x1 value 0x62c8 name sys_prctl type 0x2 bind 0x1 shndx 0x1 value 0x6430 name sys_preadv_raw type 0x2 bind 0x1 shndx 0x1 value 0x628c name sys_rt_sigqueueinfo type 0x2 bind 0x1 shndx 0x1 value 0x643c name sys_rt_tgsigqueueinfo type 0x2 bind 0x1 shndx 0x1 value 0x62bc name sys_sched_setscheduler type 0x2 bind 0x1 shndx 0x1 value 0x6400 name sys_seccomp type 0x2 bind 0x1 shndx 0x1 value 0x63e8 name sys_set_robust_list type 0x2 bind 0x1 shndx 0x1 value 0x6358 name sys_set_tid_address type 0x2 bind 0x1 shndx 0x1 value 0x625c name sys_setfsgid type 0x2 bind 0x1 shndx 0x1 value 0x6250 name sys_setfsuid type 0x2 bind 0x1 shndx 0x1 value 0x6208 name sys_setgroups type 0x2 bind 0x1 shndx 0x1 value 0x60dc name sys_setitimer type 0x2 bind 0x1 shndx 0x1 value 0x62b0 name sys_setpriority type 0x2 bind 0x1 shndx 0x1 value 0x622c name sys_setresgid type 0x2 bind 0x1 shndx 0x1 value 0x6214 name sys_setresuid type 0x2 bind 0x1 shndx 0x1 value 0x62e0 name sys_setrlimit type 0x2 bind 0x1 shndx 0x1 value 0x6154 name sys_setsockopt type 0x2 bind 0x1 shndx 0x1 value 0x60ac name sys_shmat type 0x2 bind 0x1 shndx 0x1 value 0x605c name sys_sigaction type 0x2 bind 0x1 shndx 0x1 value 0x6064 name sys_sigprocmask type 0x2 bind 0x1 shndx 0x1 value 0x6370 name sys_timer_create type 0x2 bind 0x1 shndx 0x1 value 0x63a0 name sys_timer_delete type 0x2 bind 0x1 shndx 0x1 value 0x637c name sys_timer_settime type 0x2 bind 0x1 shndx 0x1 value 0x6418 name sys_timerfd_settime type 0x2 bind 0x1 shndx 0x1 value 0x6184 name sys_wait4 type 0x2 bind 0x1 shndx 0x1 value 0x63d0 name sys_waitid type 0x2 bind 0x1 shndx 0x1 value 0x601c name sys_write type 0x2 bind 0x1 shndx 0x1 value 0x3670 name vdso_do_park type 0x2 bind 0x1 shndx 0x1 value 0x38c0 name vdso_proxify type 0x2 bind 0x1 shndx 0x1 value 0x38b0 name __vdso_fill_symtable type 0x2 bind 0x1 shndx 0x1 value 0x4520 name vdso_fill_symtable type 0x2 bind 0x1 shndx 0x1 value 0x3f30 name vdso_fill_symtable_compat type 0x2 bind 0x1 shndx 0x1 value 0x3e40 name vdso_redirect_calls type 0x2 bind 0x1 shndx 0x1 value 0x5fb0 name std_strncmp type 0x2 bind 0x1 shndx 0x1 value 0x5f00 name memset type 0x2 bind 0x1 shndx 0x1 value 0x61e4 name sys_gettimeofday type 0x2 bind 0x1 shndx 0x1 value 0x5ed0 name memcmp type 0x2 bind 0x1 shndx 0x1 value 0x5cd0 name std_dprintf type 0x2 bind 0x1 shndx 0x1 value 0x5920 name std_dputc type 0x2 bind 0x1 shndx 0x1 value 0x5940 name std_dputs type 0x2 bind 0x1 shndx 0x1 value 0x5f80 name std_strcmp type 0x2 bind 0x1 shndx 0x1 value 0x5d60 name std_strtoul type 0x2 bind 0x1 shndx 0x1 value 0x5990 name std_vdprintf type 0x0 bind 0x1 shndx 0xfff1 value 0x88d8 name __export_parasite_args type 0x0 bind 0x1 shndx 0x1 value 0x50 name __export_parasite_cmd type 0x2 bind 0x1 shndx 0x1 value 0x30 name __export_parasite_head_start type 0x2 bind 0x1 shndx 0x1 value 0x0 name __export_parasite_head_start_compat type 0x2 bind 0x1 shndx 0x1 value 0x6940 name parasite_service type 0x2 bind 0x1 shndx 0x1 value 0x6000 name __syscall_common type 0x2 bind 0x1 shndx 0x1 value 0x6148 name sys_bind type 0x2 bind 0x1 shndx 0x1 value 0x6054 name sys_brk type 0x2 bind 0x1 shndx 0x1 value 0x6274 name sys_capget type 0x2 bind 0x1 shndx 0x1 value 0x616c name sys_clone type 0x2 bind 0x1 shndx 0x1 value 0x6100 name sys_connect type 0x2 bind 0x1 shndx 0x1 value 0x60b8 name sys_dup2 type 0x2 bind 0x1 shndx 0x1 value 0x6178 name sys_exit type 0x2 bind 0x1 shndx 0x1 value 0x6448 name sys_fanotify_init type 0x2 bind 0x1 shndx 0x1 value 0x6454 name sys_fanotify_mark type 0x2 bind 0x1 shndx 0x1 value 0x619c name sys_fcntl type 0x2 bind 0x1 shndx 0x1 value 0x63f4 name sys_get_robust_list type 0x2 bind 0x1 shndx 0x1 value 0x634c name sys_get_thread_area type 0x2 bind 0x1 shndx 0x1 value 0x61fc name sys_getgroups type 0x2 bind 0x1 shndx 0x1 value 0x60d0 name sys_getitimer type 0x2 bind 0x1 shndx 0x1 value 0x6244 name sys_getpgid type 0x2 bind 0x1 shndx 0x1 value 0x6238 name sys_getresgid type 0x2 bind 0x1 shndx 0x1 value 0x6220 name sys_getresuid type 0x2 bind 0x1 shndx 0x1 value 0x6268 name sys_getsid type 0x2 bind 0x1 shndx 0x1 value 0x6160 name sys_getsockopt type 0x2 bind 0x1 shndx 0x1 value 0x6334 name sys_io_getevents type 0x2 bind 0x1 shndx 0x1 value 0x6478 name sys_kcmp type 0x2 bind 0x1 shndx 0x1 value 0x6484 name sys_memfd_create type 0x2 bind 0x1 shndx 0x1 value 0x6094 name sys_mincore type 0x2 bind 0x1 shndx 0x1 value 0x61b4 name sys_mkdir type 0x2 bind 0x1 shndx 0x1 value 0x62ec name sys_mount type 0x2 bind 0x1 shndx 0x1 value 0x60c4 name sys_nanosleep type 0x2 bind 0x1 shndx 0x1 value 0x6460 name sys_open_by_handle_at type 0x2 bind 0x1 shndx 0x1 value 0x62a4 name sys_personality type 0x2 bind 0x1 shndx 0x1 value 0x607c name sys_pread type 0x2 bind 0x1 shndx 0x1 value 0x61f0 name sys_ptrace type 0x2 bind 0x1 shndx 0x1 value 0x6014 name sys_read type 0x2 bind 0x1 shndx 0x1 value 0x63dc name sys_readlinkat type 0x2 bind 0x1 shndx 0x1 value 0x6118 name sys_recvfrom type 0x2 bind 0x1 shndx 0x1 value 0x6130 name sys_recvmsg type 0x2 bind 0x1 shndx 0x1 value 0x6364 name sys_restart_syscall type 0x2 bind 0x1 shndx 0x1 value 0x61c0 name sys_rmdir type 0x2 bind 0x1 shndx 0x1 value 0x606c name sys_rt_sigreturn type 0x2 bind 0x1 shndx 0x1 value 0x6124 name sys_sendmsg type 0x2 bind 0x1 shndx 0x1 value 0x610c name sys_sendto type 0x2 bind 0x1 shndx 0x1 value 0x631c name sys_set_thread_area type 0x2 bind 0x1 shndx 0x1 value 0x646c name sys_setns type 0x2 bind 0x1 shndx 0x1 value 0x613c name sys_shutdown type 0x2 bind 0x1 shndx 0x1 value 0x6298 name sys_sigaltstack type 0x2 bind 0x1 shndx 0x1 value 0x6424 name sys_signalfd type 0x2 bind 0x1 shndx 0x1 value 0x60f4 name sys_socket type 0x2 bind 0x1 shndx 0x1 value 0x6394 name sys_timer_getoverrun type 0x2 bind 0x1 shndx 0x1 value 0x6388 name sys_timer_gettime type 0x2 bind 0x1 shndx 0x1 value 0x61d8 name sys_umask type 0x2 bind 0x1 shndx 0x1 value 0x62f8 name sys_umount2 type 0x2 bind 0x1 shndx 0x1 value 0x61cc name sys_unlink type 0x2 bind 0x1 shndx 0x1 value 0x6490 name sys_userfaultfd type 0x2 bind 0x1 shndx 0x1 value 0x640c name sys_vmsplice type 0x2 bind 0x1 shndx 0x1 value 0x6b30 name __recv_fds type 0x2 bind 0x1 shndx 0x1 value 0x64a0 name parasite_get_rpc_sock type 0x2 bind 0x1 shndx 0x1 value 0x6990 name send_fds Relocations ------------ section 4 type 0x4 link 0x8 info 0x1 name .rela.text r_offset 0x0 r_info 0x0 / sym 0x0 type 0x0 symsecoff 0x0 Error (compel/src/lib/handle-elf-host.c:333): Unexpected undefined symbol: `'. External symbol in PIE? Any insight much appreciated.
,
May 4 2018
Had a quick look, seems like this tool does _not_ like the gold generated sections.
Forcing linker to bfd fixes the build.
diff --git a/sys-process/criu/criu-3.7.ebuild b/sys-process/criu/criu-3.7.ebuild
index 4bd0a373f27..0c0c0bd1395 100644
--- a/sys-process/criu/criu-3.7.ebuild
+++ b/sys-process/criu/criu-3.7.ebuild
@@ -74,7 +74,7 @@ src_compile() {
RAW_LDFLAGS="$(raw-ldflags)" emake \
HOSTCC="$(tc-getCC)" \
CC="$(tc-getCC)" \
- LD="$(tc-getLD)" \
+ LD="${CHOST}-ld.bfd" \
OBJCOPY="$(tc-getOBJCOPY)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
ARCH="$(criu_arch)" \
@@ -93,6 +93,7 @@ src_install() {
sed -e "s#-lnet#-L${EROOT}/usr/$(get_libdir) -lnet#g" -i criu/Makefile.packages
emake \
ARCH="$(criu_arch)" \
+ CC="$(tc-getCC)" \
PREFIX="${EPREFIX}"/usr \
LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
DESTDIR="${D}" \
Assigning to Rahul in case he wants to take a look at linker differences.
,
May 4 2018
I looked at how the relocatable object files are being linked.
The linker command is using a linker script 'compel/arch/x86/scripts/compel-pack.lds.S'.
Gold linker has trouble when using linker scripts.
I tried with latest gold from tip-of-trunk upstream, and it still reproduces the problem.
I think switching to ld.bfd is a good workaround for now.
However, I think you should keep LD="$(tc-getLD)" in src_compile().
Instead of changing that, add a src_configure() function with the following contents:
src_configure() {
# Gold linker generates invalid object file when used with linker script.
# Use the bfd based linker instead. See http://crbug.com/839665
tc-ld-disable-gold
}
,
May 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/36440de602e95eb54341f09d99171fb20df12834 commit 36440de602e95eb54341f09d99171fb20df12834 Author: Rahul Chaudhry <rahulchaudhry@chromium.org> Date: Thu May 31 23:22:41 2018 eclass: sync toolchain-funcs.eclass from upstream This pulls commit 1b4a99913beba2fb4edccb58481a92e8ab6a7d9f: - https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b4a99913beba2fb4edccb58481a92e8ab6a7d9f commit 1b4a99913beba2fb4edccb58481a92e8ab6a7d9f Author: Rahul Chaudhry <rahulchaudhry@chromium.org> Date: 2018-05-24 toolchain-funcs.eclass: fix tc-ld-disable-gold when using clang tc-ld-disable-gold checks gcc version to see if we have gcc-4.8+ The version check fails if clang is set as the compiler. $ clang -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__" 4 2 1 i.e. clang returns a gcc version of 4.2.1 This results in incorrectly adding -B ... to LDFLAGS, when clang supports "-fuse-ld" just fine. Support for "-fuse-ld" first appeared in clang-3.5, so check clang version and use the flag if supported. BUG= chromium:839665 TEST=emerge-guado_moblab sys-process/criu Change-Id: I2d5a73c11bc8e4944abbc1dc051df3ca123dc4bb Reviewed-on: https://chromium-review.googlesource.com/1080132 Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org> Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/36440de602e95eb54341f09d99171fb20df12834/eclass/toolchain-funcs.eclass
,
Jun 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ed0ea9453107441bac3def2aceaf87b09ad8fa77 commit ed0ea9453107441bac3def2aceaf87b09ad8fa77 Author: Rahul Chaudhry <rahulchaudhry@chromium.org> Date: Fri Jun 01 20:27:16 2018 toolchain-funcs.eclass: fix tc-ld-disable-gold when using clang tc-ld-disable-gold checks gcc version to see if we have gcc-4.8+ The version check fails if clang is set as the compiler. $ clang -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__" 4 2 1 i.e. clang returns a gcc version of 4.2.1 This results in incorrectly adding -B ... to LDFLAGS, when clang supports "-fuse-ld" just fine. Support for "-fuse-ld" first appeared in clang-3.5, so check clang version and use the flag if supported. BUG= chromium:839665 TEST=emerge-guado_moblab sys-process/criu Change-Id: I6e207bd8875effe308958e165d78cdd59adff3fb Reviewed-on: https://chromium-review.googlesource.com/1045553 Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org> Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/ed0ea9453107441bac3def2aceaf87b09ad8fa77/eclass/toolchain-funcs.eclass
,
Jun 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/bfd3943e0513bc0d7cb2411a5b01bc74bb504f9a commit bfd3943e0513bc0d7cb2411a5b01bc74bb504f9a Author: Rahul Chaudhry <rahulchaudhry@chromium.org> Date: Fri Jun 01 20:27:17 2018 sys-process/criu: use tc-ld-disable-gold to switch to bfd linker BUG= chromium:839665 TEST=emerge-guado_moblab sys-process/criu Change-Id: I24d4076888a52b33a78746483ff0dd6bffb3f190 Reviewed-on: https://chromium-review.googlesource.com/1045554 Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org> Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org> Reviewed-by: Rahul Chaudhry <rahulchaudhry@chromium.org> [modify] https://crrev.com/bfd3943e0513bc0d7cb2411a5b01bc74bb504f9a/sys-process/criu/criu-3.7.ebuild [rename] https://crrev.com/bfd3943e0513bc0d7cb2411a5b01bc74bb504f9a/sys-process/criu/criu-3.7-r2.ebuild
,
Jun 1 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by manojgupta@chromium.org
, May 4 2018Owner: manojgupta@chromium.org