public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop objcopy .gnu_debuglink juggle Date: Fri, 28 Oct 2022 14:27:46 +0000 (GMT) [thread overview] Message-ID: <20221028142746.C555C3851514@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ebbff10ae1ba25c541be34213a6f7f9d9a2f2774 commit ebbff10ae1ba25c541be34213a6f7f9d9a2f2774 Author: Corinna Vinschen <corinna@vinschen.de> Date: Thu Oct 27 13:05:36 2022 +0200 Cygwin: drop objcopy .gnu_debuglink juggle Prior to 591fec858d01 ("Cygwin: decouple cygheap from Cygwin DLL") the .cygheap section was required to stay the last section in the final binary. That required some juggling with objcopy to make sure the .gnu_debuglink section is prior to the .cygheap section in the final DLL. This isn't required anymore, so just drop it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/Makefile.am | 22 +++++----------------- winsup/cygwin/cygwin.sc.in | 16 ---------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am index 8debd0144..024634d28 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am @@ -576,28 +576,16 @@ $(PRE_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\ # create cygwin1.dbg file $(DBG_DLL_NAME): $(PRE_DLL_NAME) - $(AM_V_GEN)$(OBJCOPY) -R .gnu_debuglink_overlay \ - --add-gnu-debuglink=/dev/null \ + $(AM_V_GEN)$(OBJCOPY) --add-gnu-debuglink=/dev/null \ --only-keep-debug \ $(PRE_DLL_NAME) \ $(DBG_DLL_NAME) -# create stripped, temporary DLL, append .gnu_debuglink section, move -# .gnu_debuglink section in place of .gnu_debuglink_overlay placeholder -# section and store result in new-cygwin1.dll +# create stripped release DLL, append .gnu_debuglink section $(NEW_DLL_NAME): $(PRE_DLL_NAME) $(DBG_DLL_NAME) - $(AM_V_GEN)TMP_DLL_NAME=$$( mktemp --suffix=.dll ) && \ - $(OBJCOPY) -g \ - --keep-section=.gnu_debuglink_overlay \ - --add-gnu-debuglink=$(DBG_DLL_NAME) \ - $(PRE_DLL_NAME) $${TMP_DLL_NAME} && \ - vma=$$( objdump --headers $${TMP_DLL_NAME} | \ - awk '/.gnu_debuglink_overlay/{print $$4;}' ) && \ - $(OBJCOPY) -R .gnu_debuglink_overlay \ - --change-section-address .gnu_debuglink=0x$${vma} \ - --set-section-flag .gnu_debuglink=contents,readonly,debug,noload \ - $${TMP_DLL_NAME} $(NEW_DLL_NAME) && \ - rm $${TMP_DLL_NAME} + $(AM_V_GEN)$(OBJCOPY) -g \ + --add-gnu-debuglink=$(DBG_DLL_NAME) \ + $(PRE_DLL_NAME) $(NEW_DLL_NAME) # cygwin import library toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@ diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in index d984c51c9..69526f5d8 100644 --- a/winsup/cygwin/cygwin.sc.in +++ b/winsup/cygwin/cygwin.sc.in @@ -116,22 +116,6 @@ SECTIONS *(.rsrc) *(SORT(.rsrc$*)) } - .gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD): - { - BYTE(0) /* c */ - BYTE(0) /* y */ - BYTE(0) /* g */ - BYTE(0) /* w */ - BYTE(0) /* i */ - BYTE(0) /* n */ - BYTE(0) /* 1 */ - BYTE(0) /* . */ - BYTE(0) /* d */ - BYTE(0) /* b */ - BYTE(0) /* g */ - BYTE(0) /* \0 */ - LONG(0) /* checksum */ - } /DISCARD/ : { *(.debug$S)
reply other threads:[~2022-10-28 14:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221028142746.C555C3851514@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).