C / C ++ CALL16 reloc linker in xxxxx not against global character

I get these errors when linking, both messages are associated with the same object file.

CALL16 reloc at 0x5f8 not against global symbol

and

could not read symbols: Bad value

The second message seems to be the reason that I get the CALL16 error, but the file compiles just fine.

Any tips to fix this?

FYI, I cross compile for MIPS target and using gcc 4.1.2

EDIT: No luck:
My flags are used here: -fPIC, -Wl, -rpath, -Wl, -O1

I also tried the following without success:
-mno-explicit-relocs
-mexplicit-relocs
-big calls
-mno-long-calls
-mxgot
-mno-xgot


Meanwhile, I will return to the source at this moment and explore more.

+3
2

! .

:

/ .

void FooBarIsBest(void);

.

static void FooBarIsBest(void)
{
    // do the best
} 

, static . , .

CALL16 gcc . , CALL16 ... , .

, gcc (3.2.2). .:)

+2

-mlong-calls .

. MIPS.

+1

Source: https://habr.com/ru/post/1702780/


All Articles