https://sourceware.org/bugzilla/show_bug.cgi?id=33030
Bug ID: 33030
Summary: [Z80] [PATCH] accept leading zeros on dollar local
labels when using -sdcc
Product: binutils
Version: 2.45 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: aargri at gmail dot com
Target Milestone: ---
Created attachment 16109
--> https://sourceware.org/bugzilla/attachment.cgi?id=16109&action=edit
gas: accept leading zeros on dollar local labels for z80 sdcc compat
SDCC uses zero-padded 5 digit numbers as dollar local labels in its assembly
output. GAS used to accept this, but this commit removed support for such
labels:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
As a result, GAS can no longer compile SDCC's output, even with the -sdcc flag.
I've attached a patch to restore SDCC compatibility when using the -sdcc flag,
by recognizing dollar local label definitions at the beginning of the line and
replacing the leading zeros with spaces. This works fine, although it leaves
the references to these labels inside instructions unchanged.
My patch also restores the SDCC test case to use 5-digit labels. It seems like
it was modified to force it to pass when this change was first made. (?!)
I think this is a reasonable fix, but this is a complicated code base that I'm
new to. Another possible solution would be to revert the above commit.
--
You are receiving this mail because:
You are on the CC list for the bug.