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

This is a discussion on ld: fatal: too many symbols require `small' PIC references - Unix ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

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

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

    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

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

    any idea please?

    Rgds
    Antonio





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

    adisabat@gmail.com 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
    >
    >
    >
    >


+ Reply to Thread