This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ia64-hp-hpux* linker


> .libs/open.o: In function `*_gfortrani_new_unit':
> libgfortran/io/open.c:485: relocation truncated to fit: GPREL22 against symbol
> `_gfortrani_max_offset' defined in *ABS* section in .libs/libgfortran.so.3.0
> libgfortran/io/open.c:450: relocation truncated to fit: GPREL22 against symbol
> `_gfortrani_max_offset' defined in *ABS* section in .libs/libgfortran.so.3.0
> libgfortran/io/open.c:481: relocation truncated to fit: GPREL22 against symbol
> `_gfortrani_max_offset' defined in *ABS* section in .libs/libgfortran.so.3.0

There were actually more problems in different libraries, what helped me - is to
remove __attribute__ ((visibility("hidden"))) from variables that cause
problems. Or replace variables with get_* and set_* functions.

The origin of the problem is "extern" variables that are referenced by several
source files:

header.h:
#define PROPERTY_LOCAL  __attribute__ ((visibility("hidden")))
PROPERTY_LOCAL extern short shTest;

file1.c:
short shTest = 1;

file2.c:
#include "header.h"
shTest = 2;

ld: relocation truncated to fit: GPREL22 against symbol `shTest' defined in
*ABS* section in test_executable


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]