This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: linker seg fault
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Will Wagner'" <will_wagner at carallon dot com>
- Cc: <binutils at sourceware dot org>
- Date: Tue, 28 Jun 2005 17:43:10 +0100
- Subject: RE: linker seg fault
----Original Message----
>From: Will Wagner
>Sent: 28 June 2005 17:40
> Dave Korn wrote:
>> ----Original Message----
>>
>>> From: Will Wagner
>>> Sent: 28 June 2005 16:02
>>
>>
>>> Alternatively can anyone suggests steps to take to
>>> discover why it is falling over.
>>
>>
>> Well, the most direct way would be to recompile your cross-ld with -O0
>> and -g and then run it under gdb....
>
> Can rebuild with those options. How do you attach gdb to run the linker.
> It seems that I need to run it through collect2 first. Can I just take
> the arguments passed from g++ and call ld directly?
Add "-v" to the collect2 command line and it will show you the exact
options it passes to ld; just the same as when you add it to the g++ command
line and it shows you the options that it passes internally to collect2.
Then just run gdb on your linker and copy and paste the options into a "set
args" command.
cheers,
DaveK
--
Can't think of a witty .sigline today....