[all-commits] [llvm/llvm-project] 0de0b6: [ELF] Postpone "unable to move location counter ba...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Sep 20 09:06:58 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0de0b6dded4752040350feb9c81415d82478d065
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    M lld/ELF/LinkerScript.h
    M lld/ELF/Writer.cpp
    M lld/test/ELF/linkerscript/locationcountererr-arm-exidx.test
    M lld/test/ELF/linkerscript/locationcountererr.test

  Log Message:
  [ELF] Postpone "unable to move location counter backward" error (#66854)

The size of .ARM.exidx may shrink across `assignAddress` calls. It is
that the initial iteration has a larger location counter, causing
`__code_size =
__code_end - .; osec : { . += __code_size; }` to report an error, while
the error would
have been suppressed for subsequent `assignAddress` iterations.

Other sections like .relr.dyn may change sizes across `assignAddress`
calls as
well. However, their initial size is zero, so it is difficiult to
trigger a
similar error.

Similar to https://reviews.llvm.org/D152170, postpone the error
Fix #66836. While here, add more information to the error message.

More information about the All-commits mailing list