Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,068 of 4,675    |
|    aen@nospicedham.spamtrap.com to aen@nospicedham.spamtrap.com    |
|    Re: linking    |
|    20 Nov 17 10:43:40    |
      On Sun, 12 Nov 2017 13:00:17 GMT, aen@nospicedham.spamtrap.com wrote:              >gcc -o posting posting.o       >produces:       >/usr/bin/ld: posting.o: relocation R_X86_64_32S against `.data' can       >not be used when making a shared object; recompile with -fPIC       >/usr/bin/ld: final link failed: Nonrepresentable section on output       >collect2: error: ld returned 1 exit status       >...       >Why doesn't gcc use the right object files in the link?              [solved]       I had to change all the calls to for example:       call bcd2bin@PLT       instead of just       call bcd2bin              and the data references to:       and rax,[rip+m_1]       and not       and rax,[m_1]              Then       gcc -o posting posting.o       produced a dynamicall linked file.       --       aen              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca