aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-01-25 17:34:29 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-01-25 17:34:29 +0000
commit29183214f76feddb120c91c2f0dfffcf961b6f69 (patch)
treec396f1a98e38bb689eb3ea760c1947db7e7dcd2d /ld
parente11481da798a311f8d87ca44ae69203b8b6daa5d (diff)
downloadfsf-binutils-gdb-29183214f76feddb120c91c2f0dfffcf961b6f69.zip
fsf-binutils-gdb-29183214f76feddb120c91c2f0dfffcf961b6f69.tar.gz
fsf-binutils-gdb-29183214f76feddb120c91c2f0dfffcf961b6f69.tar.bz2
2008-01-25 H.J. Lu <hongjiu.lu@intel.com>
PR ld/5670 * ldlang.c (process_insert_statements): Silence gcc 4.1 alias warning.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/ldlang.c15
2 files changed, 17 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index ec540ad..071e5b9 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/5670
+ * ldlang.c (process_insert_statements): Silence gcc 4.1 alias
+ warning.
+
2008-01-25 Alan Modra <amodra@bigpond.net.au>
* ld.texinfo (INSERT): Describe.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index de3f64b7..7ef8838 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3390,19 +3390,26 @@ process_insert_statements (void)
if (last_os != NULL)
{
asection *first_sec, *last_sec;
+ struct lang_output_section_statement_struct **next;
/* Snip out the output sections we are moving. */
first_os->prev->next = last_os->next;
if (last_os->next == NULL)
- lang_output_section_statement.tail
- = (union lang_statement_union **) &first_os->prev->next;
+ {
+ next = &first_os->prev->next;
+ lang_output_section_statement.tail
+ = (lang_statement_union_type **) next;
+ }
else
last_os->next->prev = first_os->prev;
/* Add them in at the new position. */
last_os->next = where->next;
if (where->next == NULL)
- lang_output_section_statement.tail
- = (union lang_statement_union **) &last_os->next;
+ {
+ next = &last_os->next;
+ lang_output_section_statement.tail
+ = (lang_statement_union_type **) next;
+ }
else
where->next->prev = last_os;
first_os->prev = where;