-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: ld.so: object '/usr/local/lib/bear/libexec.so' from LD_PRELOAD cannot be preloaded #597
Comments
any body can help me? |
@zhzhn1234 have you tried what's in the troubleshooting page recommends? |
============================================================ The content of the makefile for Test 2 is as follows (with the cross compiler replaced):
|
Here I will make a correction, the difference is: |
The error message you see, is printed by the dynamic linker. (see If you find differences with the cross compiler behaviour vs the native compiler, that's because the library is good for one architecture, but not for the other... You might want to re-install Bear with the right CMake invocations regarding to the libdir. You might also can check the executables which are working and compare against the ones which errors. (Just a simple |
Describe the bug
ERROR: ld.so: object '/usr/local/lib/bear/libexec.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
when running bear -- make
To Reproduce
bear -- make
Environment:
=======================================================
Additional context
the source files is below:
.
├── a.c //empty file only for test
├── a.o //generate by Makefile
└── Makefile
=======================================================
Makefile content is below:
all:
aarch64-himix100-linux-gcc -c a.c
#aarch64-none-linux-gnu-gcc -c a.c
=======================================================
my test is below:
(1).use aarch64-none-linux-gnu-gcc arm64 cross-compiler in Makefile
no error,a.o generate
file a.o:
a.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped
readelf -h a.o :
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: AArch64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 408 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 9
Section header string table index: 8
(2).use aarch64-himix100-linux-gcc arm64 cross-compiler in Makefile
no error,a.o generate
file a.o:
a.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped
readelf -h a.o :
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: AArch64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 360 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 9
Section header string table index: 8
(1).use aarch64-none-linux-gnu-gcc arm64 cross-compiler in Makefile
no error,a.o generate
(2).use aarch64-himix100-linux-gcc arm64 cross-compiler in Makefile
error code is below:
aarch64-himix100-linux-gcc -c a.c
ERROR: ld.so: object '/usr/local/lib/bear/libexec.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/local/lib/bear/libexec.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/local/lib/bear/libexec.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
=======================================================
=======================================================
aarch64-himix100-linux-gcc -v:
Thread model: posix
gcc version 6.3.0 (HC&C V1R3C00SPC200B005_20190606)
aarch64-none-linux-gnu-gcc -v:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))
I guess may the cross compiler aarch64-himix100-linux-gcc the problem,but i am not sure.
how to fix the problem?
The text was updated successfully, but these errors were encountered: