# Linker script for PE. # # Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} fi # We can't easily and portably get an unquoted $ in a shell # substitution, so we do this instead. # Sorting of the .foo$* sections is required by the definition of # grouped sections in PE. # Sorting of the file names in R_IDATA is required by the # current implementation of dlltool (this could probably be changed to # use grouped sections instead). if test "${RELOCATING}"; then R_TEXT='*(SORT(.text$*))' if test "x$LD_FLAG" = "xauto_import" ; then R_DATA='*(SORT(.data$*)) *(.rdata) *(SORT(.rdata$*))' R_RDATA='' else R_DATA='*(SORT(.data$*))' R_RDATA='*(.rdata) *(SORT(.rdata$*))' fi R_IDATA234=' KEEP (SORT(*)(.idata$2)) KEEP (SORT(*)(.idata$3)) /* These zeroes mark the end of the import list. */ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); KEEP (SORT(*)(.idata$4))' R_IDATA5='SORT(*)(.idata$5)' R_IDATA67=' KEEP (SORT(*)(.idata$6)) KEEP (SORT(*)(.idata$7))' R_CRT_XC='KEEP (*(SORT(.CRT$XC*))) /* C initialization */' R_CRT_XI='KEEP (*(SORT(.CRT$XI*))) /* C++ initialization */' R_CRT_XL='KEEP (*(SORT(.CRT$XL*))) /* TLS callbacks */' R_CRT_XP='KEEP (*(SORT(.CRT$XP*))) /* Pre-termination */' R_CRT_XT='KEEP (*(SORT(.CRT$XT*))) /* Termination */' R_TLS=' KEEP (*(.tls$AAA)) KEEP (*(.tls)) KEEP (*(.tls$)) KEEP (*(SORT(.tls$*))) KEEP (*(.tls$ZZZ))' R_RSRC=' KEEP (*(.rsrc)) KEEP (*(.rsrc$*))' else R_TEXT= R_DATA= R_RDATA='*(.rdata)' R_IDATA234= R_IDATA5= R_IDATA67= R_CRT_XC= R_CRT_XI= R_CRT_XL= R_CRT_XP= R_CRT_XT= R_TLS='*(.tls)' R_RSRC='*(.rsrc)' fi cat <