You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop emitting .debug_pubnames and .debug_pubtypes into Linux object files and binaries #48762
I learned on #llvm that these sections may be read by lld to create a .gdb_index section. So perhaps they are desirable after all. I'll look into lld to see.
.debug_pubnames and .debug_pubtypes are indeed read by lld when --gdb-index is given. This doesn't appear to be the default. This emits an index that speeds up gdb symbol reading. So, it seems that Linux is the platform where these sections might be useful. However, since it requires a linker flag, perhaps the thing to do is just drop this everywhere.
.debug_pubnames and .debug_pubtypes are indeed read by lld when --gdb-index is given. This doesn't appear to be the default. This emits an index that speeds up gdb symbol reading. So, it seems that Linux is the platform where these sections might be useful. However, since it requires a linker flag, perhaps the thing to do is just drop this everywhere.
It seems like we could put emitting them behind a rustc flag by default, but add a cargo option that causes them to be emitted and turns the linker flag on?
It seems like we could skip emitting them by default, but add a cargo option that causes them to be emitted and turns the linker flag on?
Yeah, that could be done. I have other priorities, though, so I'm going to drop this for now. I can share my rustc patch if anybody wants to pick it up.
Activity
sfackler commentedon Mar 7, 2018
It seems like gcc and clang don't emit these anymore, so it'd probably make sense for us to skip them as well.
tromey commentedon Nov 15, 2018
I have a patch for this but I'm still looking at how to write a test for it.
tromey commentedon Nov 16, 2018
I learned on #llvm that these sections may be read by lld to create a
.gdb_indexsection. So perhaps they are desirable after all. I'll look into lld to see.tromey commentedon Nov 16, 2018
.debug_pubnamesand.debug_pubtypesare indeed read bylldwhen--gdb-indexis given. This doesn't appear to be the default. This emits an index that speeds up gdb symbol reading. So, it seems that Linux is the platform where these sections might be useful. However, since it requires a linker flag, perhaps the thing to do is just drop this everywhere.DenialAdams commentedon Nov 16, 2018
It seems like we could put emitting them behind a rustc flag by default, but add a cargo option that causes them to be emitted and turns the linker flag on?
tromey commentedon Nov 19, 2018
Yeah, that could be done. I have other priorities, though, so I'm going to drop this for now. I can share my rustc patch if anybody wants to pick it up.
Do not emit .debug_pubnames on Linux
khuey commentedon Mar 20, 2019
What blocks landing this?
Auto merge of rust-lang#117962 - weihanglo:debug-name-table, r=<try>
Auto merge of rust-lang#117962 - weihanglo:debug-name-table, r=<try>
Auto merge of rust-lang#117962 - weihanglo:debug-name-table, r=wesley…
[KGEN][DebugInfo][GPU] No debug name tables for nvptx (#37720)
[KGEN][DebugInfo][GPU] No debug name tables for nvptx (#37720)
[KGEN][DebugInfo][GPU] No debug name tables for nvptx (#37720)