[libc-commits] [libc] [libc] provide binary compatibility with syscall symbol (PR #117229)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Thu Nov 21 13:39:40 PST 2024
SchrodingerZhu wrote:
For example, rust std assumes syscall.
```
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.02.rcgu.o): in function `std::backtrace_rs::symbolize::gimli::mmap::Mmap::map':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/../../backtrace/src/symbolize/gimli/mmap_unix.rs:19:(.text._ZN3std12backtrace_rs9symbolize5gimli4mmap4Mmap3map17hc94ca9a7d9666f3aE+0x60): undefined reference to `mmap64'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.04.rcgu.o): in function `std::backtrace_rs::symbolize::gimli::libs_dl_iterate_phdr::native_libraries':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/../../backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs:15:(.text._ZN3std12backtrace_rs9symbolize5gimli20libs_dl_iterate_phdr16native_libraries17h0b64ac80f38a824cE+0x38): undefined reference to `dl_iterate_phdr'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::File::open_c::{{closure}}':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1185:(.text._ZN3std3sys3pal4unix2fs4File6open_c28_$u7b$$u7b$closure$u7d$$u7d$17h84c4370f703adb74E+0x35): undefined reference to `open64'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::File::file_attr':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1204:(.text._ZN3std3sys3pal4unix2fs4File9file_attr17hf80f8292d2be1bf4E+0x103): undefined reference to `fstat64'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::File::seek':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1439:(.text._ZN3std3sys3pal4unix2fs4File4seek17heeecd2aca42ba244E+0xc0): undefined reference to `lseek64'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::stat::{{closure}}':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1894:(.text._ZN3std3sys3pal4unix2fs4stat28_$u7b$$u7b$closure$u7d$$u7d$17h88326fd6fbc9bad1E+0x10f): undefined reference to `stat64'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::canonicalize::{{closure}}':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1920:(.text._ZN3std3sys3pal4unix2fs12canonicalize28_$u7b$$u7b$closure$u7d$$u7d$17hbf4ec9940e9a0e09E+0x50): undefined reference to `realpath'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::futex::futex_wait':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/futex.rs:72:(.text._ZN3std3sys3pal4unix5futex10futex_wait17h55857f1517ee301aE+0xe1): undefined reference to `syscall'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::futex::futex_wake':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/futex.rs:105:(.text._ZN3std3sys3pal4unix5futex10futex_wake17heba2048a7f0d47ccE+0x2a): undefined reference to `syscall'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::futex::futex_wake_all':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/futex.rs:114:(.text._ZN3std3sys3pal4unix5futex14futex_wake_all17hd38aa3f913171797E+0x2a): undefined reference to `syscall'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.05.rcgu.o): in function `std::sys::pal::unix::fs::try_statx::statx':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/weak.rs:171:(.text._ZN3std3sys3pal4unix2fs9try_statx5statx17ha3e238ae5b888528E+0xbb): undefined reference to `syscall'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.08.rcgu.o): in function `std::sys::pal::unix::os::errno':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:67:(.text._ZN3std3sys3pal4unix2os5errno17h0682667f97f534e6E+0x2): undefined reference to `__errno_location'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.08.rcgu.o): in function `std::sys::pal::unix::os::error_string':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:133:(.text._ZN3std3sys3pal4unix2os12error_string17h5c358e28d83321d3E+0x62): undefined reference to `__xpg_strerror_r'
/usr/bin/ld: /home/schrodingerzy/Documents/rust-linux-llvm/target/x86_64-llvm-linux-gnu/debug/deps/libstd-29cb47d2f4e02d7c.rlib(std-29cb47d2f4e02d7c.std.7aa8159242a71b71-cgu.14.rcgu.o): in function `std::sys::pal::unix::fd::FileDesc::write_vectored':
/home/schrodingerzy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fd.rs:323:(.text._ZN3std3sys3pal4unix2fd8FileDesc14write_vectored17h7e90fe10701ce2a7E+0x58): undefined reference to `writev'
```
https://github.com/llvm/llvm-project/pull/117229
More information about the libc-commits
mailing list