Linking Purify'd library results in relocation truncated to fit: R_X86_64_32 against `.gcc_except_table' at .eh_frame

Technote (troubleshooting)


Problem(Abstract)

Attempts to link a library that is instrumented using IBM Rational Purify result in the error of relocation truncated to fit: R_X86_64_32 against `.gcc_except_table' at .eh_frame section during link time.

Symptom

This is an example of the error message:


Linking
<path_to>/<lib_name>_pure_pp0_pc0_0_0_1302171628_64.a:(.eh_frame+0x1a61): relocation truncated to fit: R_X86_64_32 against `.gcc_except_table'

Purify engine: Error: The linker returned error code: 1


Cause

One possible cause of this type of error is that if the application is large.
By default, some relocations use 32-bit calculations because the mcmodel is small or medium.
If a .o file is generated with one of these models but linked into a large application, it may end up at a high address. When Purify is involved, the uninstrumented application may fit ok but because Purify increases the size of all modules, the instrumented application may overflow.


Diagnosing the problem

Build the uninstrumented application and look at the address of the .gcc_except_table.

If it is near 2G, you have probably located the issue.


Resolving the problem

You are able to prevent this issue by having object files that use the gcc option -mcmodel=large.

This will use 64-bit relocations instead of 32-bit.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Purify
General Information

Software version:

7.0.1

Operating system(s):

Linux

Reference #:

1659433

Modified date:

2014-06-26

Translate my page

Machine Translation

Content navigation