[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20026] New: Inconsistent parsing of linker scripts
From: |
felix.von.s at posteo dot de |
Subject: |
[Bug ld/20026] New: Inconsistent parsing of linker scripts |
Date: |
Sun, 01 May 2016 12:51:36 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20026
Bug ID: 20026
Summary: Inconsistent parsing of linker scripts
Product: binutils
Version: 2.26
Status: NEW
Severity: minor
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: felix.von.s at posteo dot de
Target Milestone: ---
BFD ld has inconsistent ideas about what constitutes a valid unquoted symbol
name. There may be other inconsistencies besides this, but this one is the
easiest to reproduce.
Suppose t.ld contains:
> INCLUDE "s.ld"
while s.ld contains:
> SECTIONS {
> a*b = 0;
> =1 = 0;
> }
BFD ld will perform linking with t.ld, but not s.ld:
$ > x.s
$ as x.s -o x.o
$ ld.bfd x.o -T t.ld
$ ld.bfd x.o -T s.ld
ld.bfd:s.ld:2: syntax error
gold consistently rejects line 3 of s.ld, but not line 2:
$ ld.gold x.o -T t.ld
ld.gold: error: s.ld:3:5: syntax error, unexpected '='
$ ld.gold x.o -T s.ld
ld.gold: error: s.ld:3:5: syntax error, unexpected '='
Bug discovered because I wanted to create a syntax highlighter for linker
scripts, and apparently the only available complete description of linker
script syntax is ldlex.l and ldgram.y... some documentation would be nice.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/20026] New: Inconsistent parsing of linker scripts,
felix.von.s at posteo dot de <=