This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ld for VMS?


Tristan,
? I'm seeing the following:
? Any alpha-dec-vms-ld invocation with reasonable inputs fails an assertion:
?? alpha-dec-vms-ld: BFD (GNU Binutils) 2.20.51.20100425 assertion fail /src/binutils/src/bfd/vms-lib.c:351
????????? BFD_ASSERT (sbm_sz>= sizeof (struct vms_dcxsbm) + l + 3 * sbm_len);
?in _bfd_vms_lib_archive_p. I'm not sure it is complaining about gas output or the libraries from VMS.
Maybe I'll poke around.
When I run it under a debugger:

$ gdb --args alpha-dec-vms-ld cm3-boot-ALPHA32_VMS-1/Makefile.mo
(gdb) r
Starting program: /usr/local/bin/alpha-dec-vms-ld cm3-boot-ALPHA32_VMS-1/Makefile.mo
Reading symbols for shared libraries +++. done
/usr/local/bin/alpha-dec-vms-ld: BFD (GNU Binutils) 2.20.51.20100425 assertion fail /src/binutils/src/bfd/vms-lib.c:351

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x000562bf in vms_lib_dcx (vec=0x845a08, buf=0x0, nbytes=65536) at /src/binutils/src/bfd/vms-lib.c:616
616??? ????????? if (!(sbm->flags[offset>> 3] & (1 << (offset & 7))))

up
up
(gdb) p *abfd? 
$1 = {
? id = 6, 
? filename = 0x80ed54 "ACLEDTSHR", 


Any alpha-dec-vms-as output passed to link on VMS is rejected with lots of errors, invalid record types, invalid lengths, etc.

alpha-dec-vms-gcc -malpha-as output is not accepted by VMS "macro", lots of errors.

alpha-dec-vms-nm does accept alpha-dec-vms-as output.

Any ideas?

You see, I can generate assembly on a cross host. That seems to work.
And then I can either assemble it on the cross host, copy to VMS, link on VMS,
or I could copy the assembly to VMS, run macro and link on VMS.
Or I could link on the cross host and just copy the executables to VMS.
None of the three options seems to be working.

I'll have to poke around more..

?- Jay

----------------------------------------
> From: jay.krell@cornell.edu
> To: gingold@adacore.com
> CC: binutils@sourceware.org
> Subject: RE: ld for VMS?
> Date: Thu, 22 Apr 2010 16:24:09 +0000
>
>
> Darn ok. Maybe your changes will be contributed upstream? I guess not.
> I'll try to cross build it then. I'm seeing new errors, building unwind stuff in libgcc.
> I'll try some different configurations, could be gcc configure saw the GNU as/ld and
> decided to provide more functionality.
> Yes I can see binutils trunk builds VMS ld, thanks. I had only tried the latest release.
> Maybe I should go past 4.5 for gcc too?
>
> I also had to hack the headers a bit, like ln -s . vms and
> #ifdef __GNUC__
> #ifndef __int64
> #define __int64 long long
> #endif
>
> Thanks,
>  - Jay
>
> ----------------------------------------
>> Subject: Re: ld for VMS?
>> From: gingold@adacore.com
>> Date: Thu, 22 Apr 2010 17:35:15 +0200
>> CC: binutils@sourceware.org
>> To: jay.krell@cornell.edu
>>
>>
>> On Apr 22, 2010, at 5:27 PM, Jay K wrote:
>>
>>>
>>> Awesome!
>>> "Partly" as in?
>>
>> So, partially. This is still work in progress. But I am able to link and run large programs (such as gcc).
>>
>>> I can do without shared objects, for one thing, at least for now.
>>> I can try trunk.
>>
>> Use of shared objects work. But ld can't currently generate shared images.
>>
>>> gcc 4.5 seems to largely work for Alpha/vms "out of the box".
>>> At least to output assembly, I think for GNU as. (which I had already built/installed, so configure found it).
>>
>> Right.
>>
>>> My larger goal is to cross build: gcc, bash, sed, awk, make, etc. enough so that I can build gcc natively, at least cc1.
>>
>> Well, you'd better to forget that. If you want a native gcc, you'd better to build it via a cross compiler.
>>
>> We did native builds of gcc, but it requires a lot of adjustments in the scripts. Tedious work.
>>
>> Tristan.
 		 	   		  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]