mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)
* Support for i386-sysv. configure.in: check for i386-*-sysv* and i386-*-sco*. i386coff.sc-sh: rewrote to support SVR3 by default. ldctor.c (find_constructors): preserve stat_ptr. ldlang.c (wild_doit): initialize vma and size of new output section to corresponding input section. This is required for shared library support. (lang_size_sections): don't modify vma and size of sections which are never loaded (for shared libraries). ldwrite.c (copy_and_relocate): copy the contents of any section which has contents, not just sections which are loaded (for shared libraries).
This commit is contained in:
15
ld/ChangeLog
15
ld/ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* Support for i386-sysv.
|
||||||
|
configure.in: check for i386-*-sysv* and i386-*-sco*.
|
||||||
|
i386coff.sc-sh: rewrote to support SVR3 by default.
|
||||||
|
ldctor.c (find_constructors): preserve stat_ptr.
|
||||||
|
ldlang.c (wild_doit): initialize vma and size of new output
|
||||||
|
section to corresponding input section. This is required for
|
||||||
|
shared library support.
|
||||||
|
(lang_size_sections): don't modify vma and size of sections which
|
||||||
|
are never loaded (for shared libraries).
|
||||||
|
ldwrite.c (copy_and_relocate): copy the contents of any section
|
||||||
|
which has contents, not just sections which are loaded (for shared
|
||||||
|
libraries).
|
||||||
|
|
||||||
Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||||
|
|
||||||
* ldlang.c (size_input_section): count the sizes of all sections
|
* ldlang.c (size_input_section): count the sizes of all sections
|
||||||
|
@ -1,39 +1,29 @@
|
|||||||
# This is totally made up, from the a29k stuff. If you know better,
|
# Linker script for 386 COFF. This works on SVR3.2 and SCO Unix 3.2.2.
|
||||||
# tell us about it.
|
# .data2 handles SCO, which uses two data sections.
|
||||||
|
# Ian Taylor <ian@cygnus.com>.
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
||||||
${LIB_SEARCH_DIRS}
|
${LIB_SEARCH_DIRS}
|
||||||
|
|
||||||
MEMORY {
|
ENTRY(_start)
|
||||||
text : ORIGIN = 0x1000000, LENGTH = 0x1000000
|
|
||||||
talias : ORIGIN = 0x2000000, LENGTH = 0x1000000
|
|
||||||
data : ORIGIN = 0x3000000, LENGTH = 0x1000000
|
|
||||||
mstack : ORIGIN = 0x4000000, LENGTH = 0x1000000
|
|
||||||
rstack : ORIGIN = 0x5000000, LENGTH = 0x1000000
|
|
||||||
}
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
.text : {
|
.text ${RELOCATING+ SIZEOF_HEADERS} : {
|
||||||
|
*(.init)
|
||||||
*(.text)
|
*(.text)
|
||||||
${RELOCATING+ _etext = .};
|
*(.fini)
|
||||||
*(.lit)
|
${RELOCATING+ etext = .};
|
||||||
*(.shdata)
|
|
||||||
} ${RELOCATING+ > text}
|
|
||||||
.shbss SIZEOF(.text) + ADDR(.text) : {
|
|
||||||
*(.shbss)
|
|
||||||
}
|
}
|
||||||
.talias : { } ${RELOCATING+ > talias}
|
.data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
|
||||||
.data : {
|
*(.data .data2)
|
||||||
*(.data)
|
${RELOCATING+ edata = .};
|
||||||
${RELOCATING+ _edata = .};
|
}
|
||||||
} ${RELOCATING+ > data}
|
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
|
||||||
.bss SIZEOF(.data) + ADDR(.data) :
|
|
||||||
{
|
{
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
${RELOCATING+ _end = ALIGN(0x8)};
|
${RELOCATING+ end = .};
|
||||||
}
|
}
|
||||||
.mstack : { } ${RELOCATING+ > mstack}
|
|
||||||
.rstack : { } ${RELOCATING+ > rstack}
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
14
ld/ldlang.c
14
ld/ldlang.c
@ -591,6 +591,15 @@ DEFUN (wild_doit, (ptr, section, output, file),
|
|||||||
if (output->bfd_section == (asection *) NULL)
|
if (output->bfd_section == (asection *) NULL)
|
||||||
{
|
{
|
||||||
init_os (output);
|
init_os (output);
|
||||||
|
/* Initialize the vma and size to the existing section. This will
|
||||||
|
be overriden in lang_size_sections unless SEC_NEVER_LOAD gets
|
||||||
|
set. */
|
||||||
|
if (section != (asection *) NULL)
|
||||||
|
{
|
||||||
|
bfd_set_section_vma (0, output->bfd_section,
|
||||||
|
bfd_section_vma (0, section));
|
||||||
|
output->bfd_section->_raw_size = section->_raw_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (section != (asection *) NULL
|
if (section != (asection *) NULL
|
||||||
@ -1486,6 +1495,11 @@ DEFUN (lang_size_sections, (s, output_section_statement, prev, fill,
|
|||||||
bfd_vma after;
|
bfd_vma after;
|
||||||
lang_output_section_statement_type *os = &s->output_section_statement;
|
lang_output_section_statement_type *os = &s->output_section_statement;
|
||||||
|
|
||||||
|
/* If this section is never loaded, don't change the size and
|
||||||
|
address. */
|
||||||
|
if (os->bfd_section->flags & SEC_NEVER_LOAD)
|
||||||
|
break;
|
||||||
|
|
||||||
if (os->bfd_section == &bfd_abs_section)
|
if (os->bfd_section == &bfd_abs_section)
|
||||||
{
|
{
|
||||||
/* No matter what happens, an abs section starts at zero */
|
/* No matter what happens, an abs section starts at zero */
|
||||||
|
Reference in New Issue
Block a user