Some modules .so are stripped while others are not
Hi there, I wonder why some modules are stripped of their text symbols, others are not. For example >nm -D /opt/rad/lib/rlm_rest.so | grep -i " T " gives the expected list for -g cflag. >nm -D /opt/cpr/lib/rlm_realm.so | grep -i " T " doesn't show anything, even when using ./configure --enable-developer How is this configured? I couldn't find the "magic"... Thanks in advance Till
On May 17, 2026, at 11:20 PM, g4-lisz@tonarchiv.ch wrote:
I wonder why some modules are stripped of their text symbols, others are not.
What OS? Where did you get the packages from?
For example
nm -D /opt/rad/lib/rlm_rest.so | grep -i " T "
/opt/rad is not a normal installation location.
doesn't show anything, even when using ./configure --enable-developer
How is this configured? I couldn't find the "magic"...
The Makefile, and Make.inc control how the server is build. All of the CFLAGS and LDFLAGS are defined there. If '-g' is in the CFLAGS, then the binaries are not stripped. Nothing in the default build strips the binaries of debugging symbols. Alan DeKok.
May 18, 2026 at 3:00 PM, "Alan DeKok via Freeradius-Users" <freeradius-users@lists.freeradius.org mailto:freeradius-users@lists.freeradius.org?to=%22Alan%20DeKok%20via%20Freeradius-Users%22%20%3Cfreeradius-users%40lists.freeradius.org%3E > wrote:
On May 17, 2026, at 11:20 PM, g4-lisz@tonarchiv.ch wrote:
I wonder why some modules are stripped of their text symbols, others are not.
What OS? Where did you get the packages from?
For example
nm -D /opt/rad/lib/rlm_rest.so | grep -i " T "
/opt/rad is not a normal installation location.
doesn't show anything, even when using ./configure --enable-developer
How is this configured? I couldn't find the "magic"...
The Makefile, and Make.inc control how the server is build. All of the CFLAGS and LDFLAGS are defined there.
If '-g' is in the CFLAGS, then the binaries are not stripped.
Nothing in the default build strips the binaries of debugging symbols.
Alan DeKok.
Hi Alan, Thanks a lot for your reply! I have to admit that the build is based on an old release tarball (3.0.17). This is what is still running in production here, that's why I'm still extending our own modules based on this source. I compiled it on RHEL 8, RHEL 9 and also on Ubuntu 22.04 - it's the same on all these platforms: Some modules are stripped, other's aren't. I'm using ./configure --prefix=/opt/rad No other special flags... I also compared the all.mk files in the modules subdirs, but can't find any special there that would explain the difference. It's really quit a mistery.... This is the CFLAGS form root Make.inc = $(INCLUDE) -fno-strict-aliasing -Wno-date-time -g3 -Wall -std=c99 -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -Wformat-y2k -Wno-format-extra-args -Wno-format-zero-length -Wno-cast-align -Wformat-nonliteral -Wformat-security -Wformat=2 -DWITH_VERIFY_PTR=1 Cheers Till
On May 18, 2026, at 9:58 AM, g4-lisz@tonarchiv.ch wrote:
I have to admit that the build is based on an old release tarball (3.0.17). This is what is still running in production here, that's why I'm still extending our own modules based on this source.
Hmm, OK.
I compiled it on RHEL 8, RHEL 9 and also on Ubuntu 22.04 - it's the same on all these platforms: Some modules are stripped, other's aren't.
So... is it random? Or are some modules always stripped, and others always not stripped? It's useful to describe what's actually going on in detail. Saying "stuff doesn't work" doesn't let me know what action to tale.
I'm using ./configure --prefix=/opt/rad
No other special flags...
I also compared the all.mk files in the modules subdirs, but can't find any special there that would explain the difference. It's really quit a mistery....
This is the CFLAGS form root Make.inc = $(INCLUDE) -fno-strict-aliasing -Wno-date-time -g3 -Wall -std=c99 -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -Wformat-y2k -Wno-format-extra-args -Wno-format-zero-length -Wno-cast-align -Wformat-nonliteral -Wformat-security -Wformat=2 -DWITH_VERIFY_PTR=1
You can run `VERBOSE=1 make install`, and see exactly what commands it's running to build and install things. Then, look at those commands to see which (if any) modules are being stripped. All of the modules are built with the same CFLAGS, LDFLAGS, etc. All of the modules are installed with the same scripts. So there shouldn't be any differences between them. Alan DeKok.
May 18, 2026 at 4:33 PM, "Alan DeKok via Freeradius-Users" <freeradius-users@lists.freeradius.org mailto:freeradius-users@lists.freeradius.org?to=%22Alan%20DeKok%20via%20Freeradius-Users%22%20%3Cfreeradius-users%40lists.freeradius.org%3E > wrote
You can run `VERBOSE=1 make install`, and see exactly what commands it's running to build and install things. Then, look at those commands to see which (if any) modules are being stripped.
All of the modules are built with the same CFLAGS, LDFLAGS, etc. All of the modules are installed with the same scripts. So there shouldn't be any differences between them.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sorry, our last emails crossed... I didn't complain that something isn't working. I was just wondering if there's some magic configuration. Thanks for the hint with VERBOSE env variable. BTW, the actual problem has now been solved: Valgrind complained about some read access to uninitialized memory. I did some debugging and this revealed that it was a false positive from talloc_pool_internal_reads(). This makes valgrind happy: -suppressions= ... { talloc_pool_internal_reads Memcheck:Cond obj:*/libtalloc.so* } Cheers Till
May 18, 2026 at 3:58 PM, g4-lisz@tonarchiv.ch mailto:g4-lisz@tonarchiv.ch wrote:
May 18, 2026 at 3:00 PM, "Alan DeKok via Freeradius-Users" <freeradius-users@lists.freeradius.org mailto:freeradius-users@lists.freeradius.org?to=%22Alan%20DeKok%20via%20Freeradius-Users%22%20%3Cfreeradius-users%40lists.freeradius.org%3E > wrote:
On May 17, 2026, at 11:20 PM, g4-lisz@tonarchiv.ch wrote:
I wonder why some modules are stripped of their text symbols, others are not.
What OS? Where did you get the packages from?
For example
nm -D /opt/rad/lib/rlm_rest.so | grep -i " T "
/opt/rad is not a normal installation location.
doesn't show anything, even when using ./configure --enable-developer
How is this configured? I couldn't find the "magic"...
The Makefile, and Make.inc control how the server is build. All of the CFLAGS and LDFLAGS are defined there.
If '-g' is in the CFLAGS, then the binaries are not stripped.
Nothing in the default build strips the binaries of debugging symbols.
Alan DeKok.
Hi Alan,
Thanks a lot for your reply!
I have to admit that the build is based on an old release tarball (3.0.17). This is what is still running in production here, that's why I'm still extending our own modules based on this source.
I compiled it on RHEL 8, RHEL 9 and also on Ubuntu 22.04 - it's the same on all these platforms: Some modules are stripped, other's aren't.
I'm using ./configure --prefix=/opt/rad
No other special flags...
I also compared the all.mk files in the modules subdirs, but can't find any special there that would explain the difference. It's really quit a mistery....
This is the CFLAGS form root Make.inc = $(INCLUDE) -fno-strict-aliasing -Wno-date-time -g3 -Wall -std=c99 -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -Wformat-y2k -Wno-format-extra-args -Wno-format-zero-length -Wno-cast-align -Wformat-nonliteral -Wformat-security -Wformat=2 -DWITH_VERIFY_PTR=1
Sorry for wasting your time! nm -D of course doesn't show any static functions! Silly me. Therefore I see some output for rlm_rest, because it has a few exported symbols from rest.c. Why all this fuzz: I was wondering why valgrind can't resolve some calls and only shows '????'. So I guess I have to use addr2line or alike. Cheers, Till
participants (2)
-
Alan DeKok -
g4-lisz@tonarchiv.ch