# Linker script for PE. # # Copyright (C) 2014-2015 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=' SORT(*)(.idata$2) SORT(*)(.idata$3) /* These zeroes mark the end of the import list. */ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); SORT(*)(.idata$4)' R_IDATA5='SORT(*)(.idata$5)' R_IDATA67=' SORT(*)(.idata$6) SORT(*)(.idata$7)' R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */' R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */' R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */' R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */' R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */' R_TLS=' *(.tls$AAA) *(.tls) *(.tls$) *(SORT(.tls$*)) *(.tls$ZZZ)' R_RSRC=' *(.rsrc) *(.rsrc$*)' else R_TEXT= R_DATA= R_RDATA='*(.rdata)' R_IDATA234= R_IDATA5= R_IDATA67= R_CRT= R_RSRC='*(.rsrc)' fi cat <