Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
It is being discussed on llvm-dev (https://lists.llvm.org/pipermail/llvm-dev/2020-May/141885.html https://groups.google.com/forum/#!topic/llvm-dev/i0DFx6YSqDA) what linkers should do regarding relocations referencing dropped functions (due to section group rules, --gc-sections, /DISCARD/, etc) in

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
On 2020-05-31, Fangrui Song wrote: It is being discussed on llvm-dev (https://lists.llvm.org/pipermail/llvm-dev/2020-May/141885.html https://groups.google.com/forum/#!topic/llvm-dev/i0DFx6YSqDA) what linkers should do regarding relocations referencing dropped functions (due to section group rule

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
On 2020-05-31, Mark Wielaard wrote: Hi, On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel wrote: what linkers should do regarding relocations referencing dropped functions (due to section group rules, --gc-sections, /DISCARD/, etc) in .debug_* As an example

Re: Range lists, zero-length functions, linker gc

2020-06-02 Thread Fangrui Song via Elfutils-devel
On 2020-06-03, Alan Modra wrote: On Tue, Jun 02, 2020 at 11:06:10AM -0700, David Blaikie via Binutils wrote: On Tue, Jun 2, 2020 at 9:50 AM Mark Wielaard wrote: > where I > would argue the compiler simply needs to make sure that if it generates > code in separate sections it also should create

Tombstone values in debug sections (was: Range lists, zero-length functions, linker gc)

2020-06-09 Thread Fangrui Song via Elfutils-devel
I want to revive the thread, but focus on whether a tombstone value (-1/-2) in .debug_* can cause trouble to various DWARF consumers (gdb, debug related tools in elfutils and other utilities I don't know about). Paul Robinson has proposed that DWARF v6 should reserve a tombstone value (the value