Skip to content

Parenthesis around output section VMA is not recorded #338

@parth-07

Description

@parth-07

Parenthesis around output section VMA is not recorded during parsing. Consequentially, it is missing when the output section description is printed / dumped.

Reproducer:

#!/usr/bin/env bash

cat >script.t <<\EOF
SECTIONS {
  .text (0x1000) : { *(.text*) }
}
EOF

cat >PluginConfig.yaml <<\EOF
GlobalPlugins:
  - Type: LinkerPlugin
    Name: BasicLinkerScriptGenerator
    Library: BasicLinkerScriptGenerator
EOF

ld.eld -o a.eld.out -m elf64lriscv script.t --plugin-config PluginConfig.yaml \
  -L${ELD_BUILD_ROOT}/lib/test

Output:

SECTIONS {
  .text 0x1000  : {
    *(.text*)
  }
}

Please note that 0x1000 is not enclosed in the output here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingplugin

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions