Skip to content

INSERT AFTER .comment causes linker-error on xtensa #69

@t-moe

Description

@t-moe

#67 added INSERT AFTER .comment; to the bottom of embedded-test.x. This no longer compiles on xtensa, which blocks us from merging #68

cargo build
....
error: linking with `xtensa-esp32s2-elf-gcc` failed: exit status: 1
  |
  = note:  "xtensa-esp32s2-elf-gcc" <....> "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" "-nostartfiles" "-Tlinkall.x" "-Tembedded-test.x"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /home/timo/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: .comment not found for insert
          collect2: error: ld returned 1 exit status

Strangly enough the .comment section is there (if I compile without -Tembedded-test.x)

$ xtensa-esp-elf-objdump -h target/xtensa-esp32s2-none-elf/debug/example |  grep -C2 .comment
 27 .debug_str    001f005b  00000000  00000000  00277d15  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 28 .comment      0000003f  00000000  00000000  00467d70  2**0
                  CONTENTS, READONLY
 29 .debug_line   0009987a  00000000  00000000  00467daf  2**0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions