My Oracle Support Banner

Applications Using libc as Interpreter Fail in Branded Zone With "referenced symbol not found" (Doc ID 1506602.1)

Last updated on NOVEMBER 05, 2021

Applies to:

Solaris Operating System - Version 8 2/04 U8 to 11 11/11 [Release 8.0 to 11.0]
Information in this document applies to any platform.

Symptoms

An application built with a 3rd party compiler fails with missing symbols on Solaris 10, or in a branded zone, like this.

# /var/tmp/myapp
libc.so.1: myapp: fatal: relocation error: file /var/tmp/myapp: symbol errno: referenced symbol not found
Killed

 
Actually many symbols from libc are not found:

# ldd -r /var/tmp/myapp
  /usr/lib/secure/s9_preload.so.1
  /usr/lib/libc.so.1
  symbol not found: errno (/var/tmp/myapp)
  symbol not found: __iob (/var/tmp/myap)
  symbol not found: atexit (/var/tmp/myapp)
  symbol not found: exit (/var/tmp/myapp)
  symbol not found: _exit (/var/tmp/myapp)
  symbol not found: fflush (/var/tmp/myapp)
  symbol not found: signal (/var/tmp/myapp)
  symbol not found: strcmp (/var/tmp/myapp)
  symbol not found: memset (/var/tmp/myapp)
  symbol not found: strcpy (/var/tmp/myapp)
  symbol not found: toupper (/var/tmp/myapp)
  symbol not found: atoi (/var/tmp/myapp)
  symbol not found: strlen (/var/tmp/myapp)
  symbol not found: memcpy (/var/tmp/myapp)
  symbol not found: strcat (/var/tmp/myapp)
  symbol not found: close (/var/tmp/myapp)
  symbol not found: fstat (/var/tmp/myapp)
[...]

 
libc itself is fine, and the missing symbols do exist in libc.


Complex variations are possible in non-global zones on Solaris 10.

Changes

The executably uses libc as an interpreter, rather than the linker.

# /usr/ccs/bin/elfdump -i /var/tmp/myapp
Interpreter Section: .interp
  /usr/lib/libc.so.1

If your executable's interpreter is not libc, then you are not encountering this problem.

Furthermore, the executable's NEEDED entry is /usr/lib/libc.so.1 rather than /lib/libc.so.1

# /usr/ccs/bin/elfdump -d /var/tmp/myapp | grep NEEDED  
[0] NEEDED 0x1c3 /usr/lib/libc.so.1

 

On Solaris 10 in the global zone, the problem can only show up

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
 Workaround:
 
Long term solution:
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.