aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emultempl/vms.em5
-rw-r--r--ld/scripttempl/alphavms.sc17
3 files changed, 27 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 446edc6..f08e998 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-01 Tristan Gingold <gingold@adacore.com>
+
+ * scripttempl/alphavms.sc: Add comments. Move $LINK$ to the
+ readonly output-section. Handle LIB$INITIALIZE and sections
+ created by gcc.
+ * emultempl/vms.em (vms_place_orphan): Add comments.
+
2010-05-28 Nick Clifton <nickc@redhat.com>
* Makefile.am (eshlelf_fd.c): Fix typo in rule.
diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em
index 0b6b059..f21796b 100644
--- a/ld/emultempl/vms.em
+++ b/ld/emultempl/vms.em
@@ -94,11 +94,14 @@ vms_place_orphan (asection *s,
0, 0, 0, 0
};
- /* We have nothing to say for anything other than a final link. */
+ /* We have nothing to say for anything other than a final link or an excluded
+ section. */
if (link_info.relocatable
|| (s->flags & (SEC_EXCLUDE | SEC_LOAD)) != SEC_LOAD)
return NULL;
+ /* FIXME: we should place sections by VMS program section flags. */
+
/* Only handle data sections. */
if ((s->flags & SEC_DATA) == 0)
return NULL;
diff --git a/ld/scripttempl/alphavms.sc b/ld/scripttempl/alphavms.sc
index ed4ec68..406a601 100644
--- a/ld/scripttempl/alphavms.sc
+++ b/ld/scripttempl/alphavms.sc
@@ -11,20 +11,35 @@ SECTIONS
{
${RELOCATING+. = ${PAGESIZE};}
+ /* RW initialized data. */
\$DATA\$ ALIGN (${PAGESIZE}) : {
*(\$DATA\$)
- *(\$LINK\$)
}
+ /* RW data unmodified (zero-initialized). */
\$BSS\$ ALIGN (${PAGESIZE}) : {
*(\$BSS\$)
}
+ /* RO, executable code. */
\$CODE\$ ALIGN (${PAGESIZE}) : {
*(\$CODE\$)
}
+ /* RO initialized data. */
\$LITERAL\$ ALIGN (${PAGESIZE}) : {
+ *(\$LINK\$)
*(\$LITERAL\$)
*(\$READONLY\$)
*(\$READONLY_ADDR\$)
+ *(eh_frame)
+ *(jcr)
+ *(ctors)
+ *(dtors)
+ *(gcc_except_table)
+
+ /* LIB$INITIALIZE stuff. */
+ *(LIB\$INITIALIZDZ) /* Start marker. */
+ *(LIB\$INITIALIZD_) /* Hi priority. */
+ *(LIB\$INITIALIZE) /* User. */
+ *(LIB\$INITIALIZE$) /* End marker. */
}
\$DST\$ 0 : {