From: antispam@fricas.org   
      
   Waldek Hebisch wrote:   
   > Arne Vajhøj wrote:   
   >> On 8/29/2025 1:57 PM, Simon Clubley wrote:   
   >>> On 2025-08-29, Arne Vajhøj wrote:   
   >>>> On 8/29/2025 10:14 AM, Waldek Hebisch wrote:   
   >>>>> I wonder if anybody is using GNU binutils targeting VMS. I am   
   >>>>> trying to set up toolchain for cross-compilation (from Linux) to   
   >>>>> Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I   
   >>>>> get errors suggesting serious brokennes, for example when I use   
   >>>>> 'ar' to create a library and later extract a member I get changed   
   >>>>> file and 'objdump' says that extracted file is malformed.   
   >>>>>   
   >>>>> I am now trying binutils 2.21 and apparently they do not have the   
   >>>>> problem above. But I see some weirdness and apparently '-shared'   
   >>>>> option (to create shared image) is not supported.   
   >>>>   
   >>>> I suspect very few try to build VMS executables on Linux.   
   >>>>   
   >>>   
   >>> A decade ago, I got as far as getting a simple C program for VMS Alpha   
   >>> to compile and link on Linux. Anything else more complicated than that   
   >>> (ie: other languages) failed and I suspect that either bits were missing   
   >>> from the public kits or the additional steps required were not obvious.   
   >>>   
   >>> I discussed this at length in comp.os.vms at the time. Anyone interested   
   >>> will have to rely on the notes I posted at the time as I have completely   
   >>> forgotten the details of any of this (and have no motivation to get back   
   >>> up to speed on them because my hobbies these days are very different and   
   >>> because there's no longer a proper hobbyist licence for VMS Alpha).   
   >>   
   >> I did the search:   
   >>   
   >> https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ   
   >>   
   >> https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ   
   >>   
   >> https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ   
   >   
   > I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).   
   > The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly   
   > bigger than typical headers. Reverting this and similar fix for   
   > PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared   
   > images with small header. However, cross binutils-2.39 can not read   
   > VMS object files, and any attempts at linking give result like:   
   >   
   > foo.obj: file not recognized: file format not recognized   
   >   
   > To summarize, cross binutils-2.21 have one bug known to me: 'ar' can   
   > not correctly extract '.obj' from a library. Apparently extracting   
   > file looses information about record length (that probably only affects   
   > cross ar, in native case probably RMS manages lengths).   
   > binutils-2.39 is affected by the second issue mentioned by Simon.   
   > '--disable-plugins' option to configure is not needed to get working   
   > objdump, but 'ar' from binutils-2.39 can not create libraries from VMS   
   > object files even after giving '--disable-plugins' to configure.   
   > binutils-2.43.1 seem behave in similar way to binutils-2.39.   
      
   I have filed a bug report about this to binutils bug tracker:   
      
   https://sourceware.org/bugzilla/show_bug.cgi?id=33385   
      
      
   --   
    Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|