Re: ld: fatal: too many symbols require `small' PIC references



adisabat@xxxxxxxxx schrieb:
Hi


I was linking a lot of libraries on Solaris10 sun studio 12 and I got
the following errors:


ld: fatal: too many symbols require `small' PIC references:
have 3942, maximum 2048 -- recompile some modules -K PIC.
*** Error code 1
make: Fatal error: Command failed for target

of course I tried to re-compile my code using -K PIC I mean c-code,
but it did not solve my problem


How did you try this?
I mean, what files did you recompile?

The Option "pic" resp. "PIC" refers to POSITION INDEPENDENT CODE.
The error message indicates, that there are too many symbols, which have
to be resolved at runtime (not really, but my english is not adequate to
explain this).

The difference between "pic" and "PIC" is the size of this table for
runtime-resolution.

So, to have some visible results, you shoild consider recompiling you
Libs with "-K PIC", and not your application.

Another point - refereably to check first - is:
Why do you have so many exported symbols?
Could you please at least describe, what kind of code you are working
on? Could post your Makefiles?


The option for linking are: CC -g -qoption ld -i -G

any idea please?

Rgds
Antonio




.



Relevant Pages

  • ld: fatal: too many symbols require `small PIC references
    ... I was linking a lot of libraries on Solaris10 sun studio 12 and I got ... ld: fatal: too many symbols require `small' PIC references: ... *** Error code 1 ...
    (comp.lang.c)
  • ld: fatal: too many symbols require `small PIC references
    ... I was linking a lot of libraries on Solaris10 sun studio 12 and I got ... ld: fatal: too many symbols require `small' PIC references: ... *** Error code 1 ...
    (comp.unix.programmer)
  • Re: std::codecvt undefined
    ... I wonder what I should recompile. ... > to link with libs compiled under 10.3 or not. ... I'm not sure whether I recompiled the Metrowerks libraries before ... > linking against the variants of MSL C++ that are compiled against BSD C. ...
    (comp.sys.mac.programmer.codewarrior)
  • Re: Why C is really a bad programming language
    ... |> library for the old ABI, and use a new library for a new ABI (ABI's might ... | another it is not feasible or acceptable to recompile it with the ... | headers for the new library. ... A system can allow for multiple ABIs by having libraries for each (in ...
    (comp.lang.c)
  • Re: std::codecvt undefined
    ... >> CodeWarrior installer because it detected the system version. ... the option was the recompile only the precompiled headers. ... I don't get why it would ever be necessary to rebuild precompiled headers ... without it being necessary to rebuild libraries though. ...
    (comp.sys.mac.programmer.codewarrior)