On Wed, 28 Apr 2021 15:14:24 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> Signed-off-by: Andrew Leonard <anleo...@redhat.com> > > make/common/NativeCompilation.gmk line 979: > >> 977: else ifeq ($(call isTargetOs, aix), true) >> 978: $1_DEBUGINFO_FILES := >> $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo >> 979: $1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) >> $$($1_DEBUGINFO_FILES) > > This looks like you are just copying the linked binary and calling it > .debuginfo. Is the idea that the original binary then gets stripped and this > is just saving the unstripped binary? I don't know how things are done in > AIX, but this seems like a rather strange way of achieving external symbol > information to me. You're essentially correct Erik, on AIX there is no such tool as OBJCOPY on Linux platforms, so you cannot physically remove the symbolic information from the native compiled object. So this CREATE_DEBUG_INFO_CMDS copies the object containing symbols, prior to the STRIP_CMD being executed as part of the make of $$($1_TARGET) recipe: $$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) The external debuginfo is then passed by the user of AIX dbx using -B <.debuginfo> You make a good point though that this looks confusing, so I will update the PR with a comment to this rule. thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/3763