Facing Linking Error "ld: Fatal: Relocation Error: R_SPARC_UA32:" While Compiling With Solaris Studio-12

(Doc ID 2309298.1)

Last updated on SEPTEMBER 21, 2017

Applies to:

Oracle Solaris Studio - Version 12.3 and later
Information in this document applies to any platform.

Goal

After migrating from SunStudio 10 to Oracle Developer Studio 12.3, while building a library, the linking error below is reported

Linking error:
ld: fatal: relocation error: R_SPARC_UA32: file ........: section [89].rela.debug_line: symbol .text%........ (section): symbol has been discarded with discarded section: [8].text%<method_name>(<class_name>).

where <method_name> is the method name for which the symbol gets discarded and <class_name> is the name of the class <method_name> belongs to.

 

How to solve this error?
 

Solution

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms