[2/4] VAX: drop OBJ_VMS leftovers
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
OBJ_VMS support was dropped almost 20 years ago (e330299ed5ee). Drop
respective code from tc-vax.c as well.
While there, make adjustments for OBJ_ELF as well: -K was dropped over
20 years ago (530556a951f5), yet left in md_shortopts. OPTION_PIC isn't
really necessary either; 'k' can be used instead. And then the ELF
options available weren't displayed by md_show_usage().
Comments
On Tue, 30 Jul 2024, Jan Beulich wrote:
> OBJ_VMS support was dropped almost 20 years ago (e330299ed5ee). Drop
> respective code from tc-vax.c as well.
>
> While there, make adjustments for OBJ_ELF as well: -K was dropped over
> 20 years ago (530556a951f5), yet left in md_shortopts. OPTION_PIC isn't
> really necessary either; 'k' can be used instead. And then the ELF
> options available weren't displayed by md_show_usage().
ISTM these should be 3-4 separate self-contained patches (plus tc-vax.h
was missed for the OBJ_VMS change).
Maciej
On 31.07.2024 03:19, Maciej W. Rozycki wrote:
> On Tue, 30 Jul 2024, Jan Beulich wrote:
>
>> OBJ_VMS support was dropped almost 20 years ago (e330299ed5ee). Drop
>> respective code from tc-vax.c as well.
>>
>> While there, make adjustments for OBJ_ELF as well: -K was dropped over
>> 20 years ago (530556a951f5), yet left in md_shortopts. OPTION_PIC isn't
>> really necessary either; 'k' can be used instead. And then the ELF
>> options available weren't displayed by md_show_usage().
>
> ISTM these should be 3-4 separate self-contained patches
It could be split, yes, but it didn't seem worth it. If we talk about
"could" here, the (non-existing) target maintainers should long have
cleaned up.
> (plus tc-vax.h was missed for the OBJ_VMS change).
Oh, indeed. Thanks for pointing out.
Jan
On Wed, 31 Jul 2024, Jan Beulich wrote:
> > ISTM these should be 3-4 separate self-contained patches
>
> It could be split, yes, but it didn't seem worth it. If we talk about
> "could" here, the (non-existing) target maintainers should long have
> cleaned up.
Technically the port isn't broken, just suboptimal, and the maintainers
may only have enough resources to focus on urgent matters.
I'm not sure if the level of maintenance a given piece of code receives
is supposed to correlate with the standard of submissions made. I'd argue
we'd best keep the same standard everywhere (and for less maintained parts
it might be especially beneficial to hold to the highest standard, because
there may be fewer resources available to clean things up if something
slips through).
Besides, it does not appear to me that splitting this particular change
into pieces would be that complex and time consuming.
Maciej
On Wed, 2024-07-31 09:24:52 +0200, Jan Beulich <jbeulich@suse.com> wrote:
> On 31.07.2024 03:19, Maciej W. Rozycki wrote:
> > On Tue, 30 Jul 2024, Jan Beulich wrote:
[...]
> > (plus tc-vax.h was missed for the OBJ_VMS change).
>
> Oh, indeed. Thanks for pointing out.
Sorry for not being responsive atm. Kind of sick and will probably
need another week or two :-(
MfG, JBG
--
@@ -1021,10 +1021,6 @@ vax_reg_parse (char c1, char c2, char c3
c2 = c3;
c3 = c4;
#endif
-#ifdef OBJ_VMS
- if (c4 != 0) /* Register prefixes are not allowed under VMS. */
- return retval;
-#endif
#ifdef OBJ_AOUT
if (c1 == '%') /* Register prefixes are optional under a.out. */
{
@@ -2193,18 +2189,15 @@ md_create_long_jump (char *ptr,
md_number_to_chars (ptr, offset, 4);
}
-#ifdef OBJ_VMS
-const char *md_shortopts = "d:STt:V+1h:Hv::";
-#elif defined(OBJ_ELF)
-const char *md_shortopts = "d:STt:VkKQ:";
+#ifdef OBJ_ELF
+const char *md_shortopts = "d:STt:VkQ:";
#else
const char *md_shortopts = "d:STt:V";
#endif
struct option md_longopts[] =
{
#ifdef OBJ_ELF
-#define OPTION_PIC (OPTION_MD_BASE)
- { "pic", no_argument, NULL, OPTION_PIC },
+ { "pic", no_argument, NULL, 'k' },
#endif
{ NULL, no_argument, NULL, 0 }
};
@@ -2235,40 +2228,7 @@ md_parse_option (int c, const char *arg)
as_warn (_("I don't use an interpass file! -V ignored"));
break;
-#ifdef OBJ_VMS
- case '+': /* For g++. Hash any name > 31 chars long. */
- flag_hash_long_names = 1;
- break;
-
- case '1': /* For backward compatibility. */
- flag_one = 1;
- break;
-
- case 'H': /* Show new symbol after hash truncation. */
- flag_show_after_trunc = 1;
- break;
-
- case 'h': /* No hashing of mixed-case names. */
- {
- extern char vms_name_mapping;
- vms_name_mapping = atoi (arg);
- flag_no_hash_mixed_case = 1;
- }
- break;
-
- case 'v':
- {
- extern char *compiler_version_string;
-
- if (!arg || !*arg || access (arg, 0) == 0)
- return 0; /* Have caller show the assembler version. */
- compiler_version_string = arg;
- }
- break;
-#endif
-
#ifdef OBJ_ELF
- case OPTION_PIC:
case 'k':
flag_want_pic = 1;
break; /* -pic, Position Independent Code. */
@@ -2297,15 +2257,11 @@ VAX options:\n\
-t FILE ignored\n\
-T ignored\n\
-V ignored\n"));
-#ifdef OBJ_VMS
+#ifdef OBJ_ELF
fprintf (stream, _("\
-VMS options:\n\
--+ hash encode names longer than 31 characters\n\
--1 `const' handling compatible with gcc 1.x\n\
--H show new symbol after hash truncation\n\
--h NUM don't hash mixed-case names, and adjust case:\n\
- 0 = upper, 2 = lower, 3 = preserve case\n\
--v\"VERSION\" code being assembled was produced by compiler \"VERSION\"\n"));
+ELF options:\n\
+-k -pic enable PIC mode\n\
+-Q[y|n] ignored\n"));
#endif
}