[Bug gas/30162] New: Discrepancy in the interface exposed to tc_frob_label

2023-02-24 Thread piannetta at kalrayinc dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30162

Bug ID: 30162
   Summary: Discrepancy in the interface exposed to tc_frob_label
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: piannetta at kalrayinc dot com
  Target Milestone: ---

After reading a label in gas/read.c, a CPU-specific back-end can register the
TC_FROB_LABEL hook.  However, the position of the INPUT_LINE_POINTER is not the
same whether the label is surrounded by quotes or not:
  - when the label is not surrounded by quotes, *INPUT_LINE_POINTER is the
character after the colon;
  - when the label is surrounded by quotes, *INPUT_LINE_POINTER is the colon
itself.

I would expect that in both cases, *INPUT_LINE_POINTER is the character after
the colon.  A simple fix would be to move the INPUT_LINE_POINTER once more when
the label symbol is terminated by a '"'.

diff --git a/gas/read.c b/gas/read.c
--- a/gas/read.c
+++ b/gas/read.c
@@ -986,6 +986,8 @@ read_a_source_file (const char *name)
  nul_char = get_symbol_name (& s); /* name's delimiter.  */
  next_char = (nul_char == '"' ? input_line_pointer[1] : nul_char);
  rest = input_line_pointer + (nul_char == '"' ? 2 : 1);
+ if (nul_char == '"')
+   ++input_line_pointer;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30155] ld: Segfault in _bfd_nearby_section with custom linker scripts

2023-02-24 Thread acoplan at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30155

--- Comment #5 from Alex Coplan  ---
Hi Alan, thanks for working on this. Would it be possible to backport the fix
to any earlier binutils versions (after some time on trunk)?

-- 
You are receiving this mail because:
You are on the CC list for the bug.