Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-10-27 14:05:36 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-10-28 17:26:53 +0300
commitebbff10ae1ba25c541be34213a6f7f9d9a2f2774 (patch)
treef8ef8c2657ce38a0e02c52441540c4c6a39f17b3 /winsup/cygwin/Makefile.am
parent49df152de7cba665e08a807e5cbc3dea846c88fa (diff)
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>
Diffstat (limited to 'winsup/cygwin/Makefile.am')
-rw-r--r--winsup/cygwin/Makefile.am22
1 files changed, 5 insertions, 17 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@