Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Binutils and Alpha VMS - an update

77 views
Skip to first unread message

Simon Clubley

unread,
Feb 19, 2017, 5:38:50 PM2/19/17
to
I recently mentioned that I had tried to once again build a cross
compiler for VMS Alpha on Linux (still with limited success) but
that I had also run into a new problem with the current version
of binutils, which at the time of writing this is version 2.27.

I also said that I would have a look at this new problem if time
permitted which I have now done. It turns out that I have found
two problems (the second one only revealed itself after I fixed
the first one).

The first problem is with the ar archiver. Although built as a
cross-compiled binutils, ar was attempting to create new archives
in native format instead of VMS format and then crashing during
the archive creation process. Existing archives were processed ok
(well, as ok as the Alpha VMS ar code has ever worked :-)); it was
just the creation of new archives that failed.

This _appears_ to be as the result of a change to the way the
variable plugin_target in binutils/ar.c is now being initialised.

This _appears_ to have broken some archive format detection code
and can be worked around by using --disable-plugins on the
binutils cross-compiler configure command.

The second problem is that the binutils linker would not link
against the Linux copy of sys$public_vectors.exe, claiming the
file format was unrecognised.

This _appears_ to be a problem in vms-alpha.c and _appears_ to
be the result of code added for PR 17512. This was my workaround
patch:

-----------------------------------------------------------------------------
--- /work/vms-cc-src/binutils-2.27/bfd/vms-alpha.c~ 2016-08-03 08:36:51.000000000 +0100
+++ /work/vms-cc-src/binutils-2.27/bfd/vms-alpha.c 2017-02-18 07:38:51.000000000 +0000
@@ -2546,9 +2546,11 @@
/* Reset the record pointer. */
PRIV (recrd.rec) = buf;

+#ifdef simon_revert
/* PR 17512: file: 7d7c57c2. */
if (PRIV (recrd.rec_size) < sizeof (struct vms_eihd))
goto error_ret;
+#endif
vms_debug2 ((2, "file type is image\n"));

if (_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset) != TRUE)
-----------------------------------------------------------------------------

which caused the linker to start working again.

However, I _very_ strongly recommend that no-one blindly use this
patch without understanding what the code I commented out was intended
to fix and to see if a different version of the code is required.

If I had got anywhere new with the cross compiler, this is exactly
what I would have done next.

Anyway, my work on this is now at an end, and I am now back on
another project.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world
0 new messages