Right now in case of LTO the section is not emited:
$ cat test.c void __attribute__((optnone)) bar() { } void __attribute__((optnone)) foo() { bar(); } int main() { foo(); } $ clang -flto=thin -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 0 $ clang -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 2
Fix this by passing explicitly --plugin-opt=-generate-arange-section.
Suggested-by: OCHyams <orlando.hyams@sony.com>
The note should really say "PS4/PS5 do not go through this path, hence ..."