2010-09-22 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add idata to orphan set. * emultempl/pep.em: Likewise. * scripttempl/armcoff.sc: Separate idata and add __IAT_start__ and __IAT_end__ labels. * scripttempl/pe.sc: Likewise. * scripttempl/pep.sc: Likewise.
This commit is contained in:
parent
cb2f80e68a
commit
d487497340
10
ld/ChangeLog
10
ld/ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2010-09-22 Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
|
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add
|
||||||
|
idata to orphan set.
|
||||||
|
* emultempl/pep.em: Likewise.
|
||||||
|
* scripttempl/armcoff.sc: Separate idata
|
||||||
|
and add __IAT_start__ and __IAT_end__ labels.
|
||||||
|
* scripttempl/pe.sc: Likewise.
|
||||||
|
* scripttempl/pep.sc: Likewise.
|
||||||
|
|
||||||
2010-09-20 David S. Miller <davem@davemloft.net>
|
2010-09-20 David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
* emulparams/elf32_sparc.sh: Set NOP to 0x01000000
|
* emulparams/elf32_sparc.sh: Set NOP to 0x01000000
|
||||||
|
|
|
@ -1939,6 +1939,9 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
{ ".text",
|
{ ".text",
|
||||||
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
|
||||||
0, 0, 0, 0 },
|
0, 0, 0, 0 },
|
||||||
|
{ ".idata",
|
||||||
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
||||||
|
0, 0, 0, 0 },
|
||||||
{ ".rdata",
|
{ ".rdata",
|
||||||
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
||||||
0, 0, 0, 0 },
|
0, 0, 0, 0 },
|
||||||
|
@ -1952,6 +1955,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
enum orphan_save_index
|
enum orphan_save_index
|
||||||
{
|
{
|
||||||
orphan_text = 0,
|
orphan_text = 0,
|
||||||
|
orphan_idata,
|
||||||
orphan_rodata,
|
orphan_rodata,
|
||||||
orphan_data,
|
orphan_data,
|
||||||
orphan_bss
|
orphan_bss
|
||||||
|
@ -1985,7 +1989,10 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
else if ((s->flags & SEC_READONLY) == 0)
|
else if ((s->flags & SEC_READONLY) == 0)
|
||||||
place = &hold[orphan_data];
|
place = &hold[orphan_data];
|
||||||
else if ((s->flags & SEC_CODE) == 0)
|
else if ((s->flags & SEC_CODE) == 0)
|
||||||
place = &hold[orphan_rodata];
|
{
|
||||||
|
place = (!strncmp (secname, ".idata\$", 7) ? &hold[orphan_idata]
|
||||||
|
: &hold[orphan_rodata]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
place = &hold[orphan_text];
|
place = &hold[orphan_text];
|
||||||
|
|
||||||
|
|
|
@ -1677,6 +1677,9 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
{ ".text",
|
{ ".text",
|
||||||
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
|
||||||
0, 0, 0, 0 },
|
0, 0, 0, 0 },
|
||||||
|
{ ".idata",
|
||||||
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
||||||
|
0, 0, 0, 0 },
|
||||||
{ ".rdata",
|
{ ".rdata",
|
||||||
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
|
||||||
0, 0, 0, 0 },
|
0, 0, 0, 0 },
|
||||||
|
@ -1690,6 +1693,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
enum orphan_save_index
|
enum orphan_save_index
|
||||||
{
|
{
|
||||||
orphan_text = 0,
|
orphan_text = 0,
|
||||||
|
orphan_idata,
|
||||||
orphan_rodata,
|
orphan_rodata,
|
||||||
orphan_data,
|
orphan_data,
|
||||||
orphan_bss
|
orphan_bss
|
||||||
|
@ -1723,7 +1727,10 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||||
else if ((s->flags & SEC_READONLY) == 0)
|
else if ((s->flags & SEC_READONLY) == 0)
|
||||||
place = &hold[orphan_data];
|
place = &hold[orphan_data];
|
||||||
else if ((s->flags & SEC_CODE) == 0)
|
else if ((s->flags & SEC_CODE) == 0)
|
||||||
place = &hold[orphan_rodata];
|
{
|
||||||
|
place = (!strncmp (secname, ".idata\$", 7) ? &hold[orphan_idata]
|
||||||
|
: &hold[orphan_rodata]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
place = &hold[orphan_text];
|
place = &hold[orphan_text];
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,22 @@ DTOR='.dtor : {
|
||||||
*(SORT(.dtors.*))
|
*(SORT(.dtors.*))
|
||||||
*(.dtor)
|
*(.dtor)
|
||||||
}'
|
}'
|
||||||
|
if test "${RELOCATING}"; then
|
||||||
|
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)'
|
||||||
|
else
|
||||||
|
R_IDATA234=
|
||||||
|
R_IDATA5=
|
||||||
|
R_IDATA67=
|
||||||
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
|
||||||
${LIB_SEARCH_DIRS}
|
${LIB_SEARCH_DIRS}
|
||||||
|
@ -60,6 +75,16 @@ SECTIONS
|
||||||
}
|
}
|
||||||
${CONSTRUCTING+${RELOCATING-$CTOR}}
|
${CONSTRUCTING+${RELOCATING-$CTOR}}
|
||||||
${CONSTRUCTING+${RELOCATING-$DTOR}}
|
${CONSTRUCTING+${RELOCATING-$DTOR}}
|
||||||
|
.idata ${RELOCATING+BLOCK(__section_alignment__)} :
|
||||||
|
{
|
||||||
|
/* This cannot currently be handled with grouped sections.
|
||||||
|
See pep.em:sort_sections. */
|
||||||
|
${R_IDATA234}
|
||||||
|
${RELOCATING+__IAT_start__ = .;}
|
||||||
|
${R_IDATA5}
|
||||||
|
${RELOCATING+__IAT_end__ = .;}
|
||||||
|
${R_IDATA67}
|
||||||
|
}
|
||||||
.bss ${RELOCATING+ ALIGN(0x8)} :
|
.bss ${RELOCATING+ ALIGN(0x8)} :
|
||||||
{
|
{
|
||||||
${RELOCATING+ __bss_start__ = . ;}
|
${RELOCATING+ __bss_start__ = . ;}
|
||||||
|
|
|
@ -23,13 +23,14 @@ if test "${RELOCATING}"; then
|
||||||
R_RDATA='*(.rdata)
|
R_RDATA='*(.rdata)
|
||||||
*(SORT(.rdata$*))'
|
*(SORT(.rdata$*))'
|
||||||
fi
|
fi
|
||||||
R_IDATA='
|
R_IDATA234='
|
||||||
SORT(*)(.idata$2)
|
SORT(*)(.idata$2)
|
||||||
SORT(*)(.idata$3)
|
SORT(*)(.idata$3)
|
||||||
/* These zeroes mark the end of the import list. */
|
/* These zeroes mark the end of the import list. */
|
||||||
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
||||||
SORT(*)(.idata$4)
|
SORT(*)(.idata$4)'
|
||||||
SORT(*)(.idata$5)
|
R_IDATA5='SORT(*)(.idata$5)'
|
||||||
|
R_IDATA67='
|
||||||
SORT(*)(.idata$6)
|
SORT(*)(.idata$6)
|
||||||
SORT(*)(.idata$7)'
|
SORT(*)(.idata$7)'
|
||||||
R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
|
R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
|
||||||
|
@ -46,7 +47,9 @@ else
|
||||||
R_TEXT=
|
R_TEXT=
|
||||||
R_DATA=
|
R_DATA=
|
||||||
R_RDATA='*(.rdata)'
|
R_RDATA='*(.rdata)'
|
||||||
R_IDATA=
|
R_IDATA234=
|
||||||
|
R_IDATA5=
|
||||||
|
R_IDATA67=
|
||||||
R_CRT=
|
R_CRT=
|
||||||
R_RSRC=
|
R_RSRC=
|
||||||
fi
|
fi
|
||||||
|
@ -147,7 +150,11 @@ SECTIONS
|
||||||
{
|
{
|
||||||
/* This cannot currently be handled with grouped sections.
|
/* This cannot currently be handled with grouped sections.
|
||||||
See pe.em:sort_sections. */
|
See pe.em:sort_sections. */
|
||||||
${R_IDATA}
|
${R_IDATA234}
|
||||||
|
${RELOCATING+__IAT_start__ = .;}
|
||||||
|
${R_IDATA5}
|
||||||
|
${RELOCATING+__IAT_end__ = .;}
|
||||||
|
${R_IDATA67}
|
||||||
}
|
}
|
||||||
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
|
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,14 @@ if test "${RELOCATING}"; then
|
||||||
R_RDATA='*(.rdata)
|
R_RDATA='*(.rdata)
|
||||||
*(SORT(.rdata$*))'
|
*(SORT(.rdata$*))'
|
||||||
fi
|
fi
|
||||||
R_IDATA='
|
R_IDATA234='
|
||||||
SORT(*)(.idata$2)
|
SORT(*)(.idata$2)
|
||||||
SORT(*)(.idata$3)
|
SORT(*)(.idata$3)
|
||||||
/* These zeroes mark the end of the import list. */
|
/* These zeroes mark the end of the import list. */
|
||||||
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
||||||
SORT(*)(.idata$4)
|
SORT(*)(.idata$4)'
|
||||||
SORT(*)(.idata$5)
|
R_IDATA5='SORT(*)(.idata$5)'
|
||||||
|
R_IDATA67='
|
||||||
SORT(*)(.idata$6)
|
SORT(*)(.idata$6)
|
||||||
SORT(*)(.idata$7)'
|
SORT(*)(.idata$7)'
|
||||||
R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
|
R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
|
||||||
|
@ -46,7 +47,9 @@ else
|
||||||
R_TEXT=
|
R_TEXT=
|
||||||
R_DATA=
|
R_DATA=
|
||||||
R_RDATA='*(.rdata)'
|
R_RDATA='*(.rdata)'
|
||||||
R_IDATA=
|
R_IDATA234=
|
||||||
|
R_IDATA5=
|
||||||
|
R_IDATA67=
|
||||||
R_CRT=
|
R_CRT=
|
||||||
R_RSRC=
|
R_RSRC=
|
||||||
fi
|
fi
|
||||||
|
@ -153,7 +156,11 @@ SECTIONS
|
||||||
{
|
{
|
||||||
/* This cannot currently be handled with grouped sections.
|
/* This cannot currently be handled with grouped sections.
|
||||||
See pep.em:sort_sections. */
|
See pep.em:sort_sections. */
|
||||||
${R_IDATA}
|
${R_IDATA234}
|
||||||
|
${RELOCATING+__IAT_start__ = .;}
|
||||||
|
${R_IDATA5}
|
||||||
|
${RELOCATING+__IAT_end__ = .;}
|
||||||
|
${R_IDATA67}
|
||||||
}
|
}
|
||||||
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
|
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue