The kernel does have optimised versions of some of these functions, in the arch-specific directories; see for example the x86 implementation of memchr (see all the memchr definitions, and all the strchr definitions). The versions you found are the fallback generic versions; you can spot these by looking for the protective check, #ifndef __HAVE_ARCH_MEMCHR ...
I remember that I had to fix a kernel core dump bug in Solaris in 2006 that was triggered with a ISO-9660 + Rock Ridge file system created by something other than mkisofs.
That ISO formatting software did not include the Rock Ridge file name in the middle of the ISO-9660 directory entry (as done by mkisofs) but at the end of the ISO-9660 directory entry. ...
The ABI of a compiled library depends on its target, and that doesn’t have to include an operating system. There are libraries for embedded systems with no operating system, and there are libraries for platforms such as Java which abstract away the operating system’s ABI.
As you say, the operating system’s ABI determines how a library (or program) calls into ...
Is there an rpath for dynamic linked libraries?
Yes, there is. You can use -Wl,-rpath with ELF shared objects just
like with ELF executables. Clone a little example I put up
git clone https://gist.github.com/ardrabczyk/6aeb8545c9b754d6b15be390af4bdff0
Run make to compile. Check what libraries are needed by the main
$ readelf -d ./...
You need to install the i386 development packages:
sudo apt install libudev-dev:i386 libusb-1.0-0-dev:i386
These two are co-installable with their amd64 versions so you won’t need to uninstall anything.
You need to manually specify the dynamic loader and library path:
LD_LIBRARY_PATH=/usr/lib64_bck /usr/lib64_bck/ld-linux-x86-64.so.2 /usr/bin/mv /usr/lib64_bck /usr/lib64
The way this works is as follows. mv can no longer run on its own, because its interpreter, /lib64/ld-linux-x86-64.so.2, has disappeared (on RHEL 7, /lib64 is a symlink to /usr/lib64); so ...
So, there's a couple questions here and I'll try to address them in an order that makes sense:
What are snaps?
Snaps are a way to package software, like deb packages or flatpaks. They work across linux distros and have become popular because of how easy they are to maintain and use. You can find more here: https://snapcraft.io/
What are the gnome, code, ...
Yes it is safe to free up some space by deleting the the snap cache in /var/lib/snapd/snaps/ when the folder grows large.
sudo apt purge snapd
This should actually remove that dir and all traces of snaps on your system.
More snap versions are stored by the system after snap package updates. Meaning that for each installed snap package that had ...
Play around with ld.so.conf(.d) and LD_LIBRARY_PATH variable. You will find more on this topic in the ld.so(8) manual page.
If a shared object dependency does not contain a slash,
then it is searched for in the following order:
Using the environment variable LD_LIBRARY_PATH
(unless the executable is being run in secure-execution
mode; see below)...
Answer to the question as asked.
Without seeing the Makefile it is not possible to say what variables, if any, are used in the final link step. CFLAGS and LDFLAGS are a widely supported convention but is not required. The OP tells us in comments that the Makefile is "huge" and possibly automatically generated. GNU Make has -O --trace options these days so ...