From: "Jan Beulich" <JBeulich@novell.com>
To: <binutils@sources.redhat.com>
Subject: [PATCH] x86: .bss/.previous interaction
Date: Thu, 31 Mar 2005 22:56:00 -0000 [thread overview]
Message-ID: <s24c2cd3.016@emea1-mh.id2.novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]
i386's and x86-64's .bss did not interact correctly with ELF's .previous.
Built and tested on i686-pc-linux-gnu as well as for i686-coff and i686-aout.
Jan
gas/
2005-03-31 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (s_bss): Call obj_elf_section_change_hook.
gas/testsuite/
2005-03-31 Jan Beulich <jbeulich@novell.com>
* gas/i386/bss.[sd]: New.
* gas/i386/i386.exp: Run new test.
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/config/tc-i386.c 2005-03-14 15:08:07.000000000 +0100
+++ 2005-03-31/gas/config/tc-i386.c 2005-03-31 17:19:26.899585544 +0200
@@ -5306,6 +5306,10 @@ s_bss (ignore)
{
int temp;
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ if (IS_ELF)
+ obj_elf_section_change_hook ();
+#endif
temp = get_absolute_expression ();
subseg_set (bss_section, (subsegT) temp);
demand_empty_rest_of_line ();
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/bss.d 1970-01-01 01:00:00.000000000 +0100
+++ 2005-03-31/gas/testsuite/gas/i386/bss.d 2005-03-31 16:17:50.000000000 +0200
@@ -0,0 +1,7 @@
+#objdump: -s
+#name: i386 .bss
+
+.*: +file format .*
+
+Contents of section \.other:
+ 0000 0102 .*
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/bss.s 1970-01-01 01:00:00.000000000 +0100
+++ 2005-03-31/gas/testsuite/gas/i386/bss.s 2005-03-31 16:19:26.000000000 +0200
@@ -0,0 +1,7 @@
+ .data
+ .section .other, "a", @progbits
+ .byte 1
+ .bss
+ .skip 1
+ .previous
+ .byte 2
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/i386.exp 2005-03-31 16:25:51.000000000 +0200
+++ 2005-03-31/gas/testsuite/gas/i386/i386.exp 2005-03-31 17:10:14.200608560 +0200
@@ -135,3 +135,13 @@ if [expr ([istarget "i*86-*-*"] || [ista
set ASFLAGS "$old_ASFLAGS"
}
+
+if { ([istarget i*86-*-*] || [istarget x86_64-*-*]) } then {
+ if { [istarget *-*-elf*]
+ || [istarget *-*-linux*]
+ && ![istarget *-*-linux*aout*]
+ && ![istarget *-*-linux*oldld*]
+ } then {
+ run_dump_test "bss"
+ }
+}
[-- Attachment #2: binutils-mainline-x86-elf-bss.patch --]
[-- Type: text/plain, Size: 2030 bytes --]
i386's and x86-64's .bss did not interact correctly with ELF's .previous.
Built and tested on i686-pc-linux-gnu as well as for i686-coff and i686-aout.
Jan
gas/
2005-03-31 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (s_bss): Call obj_elf_section_change_hook.
gas/testsuite/
2005-03-31 Jan Beulich <jbeulich@novell.com>
* gas/i386/bss.[sd]: New.
* gas/i386/i386.exp: Run new test.
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/config/tc-i386.c 2005-03-14 15:08:07.000000000 +0100
+++ 2005-03-31/gas/config/tc-i386.c 2005-03-31 17:19:26.899585544 +0200
@@ -5306,6 +5306,10 @@ s_bss (ignore)
{
int temp;
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ if (IS_ELF)
+ obj_elf_section_change_hook ();
+#endif
temp = get_absolute_expression ();
subseg_set (bss_section, (subsegT) temp);
demand_empty_rest_of_line ();
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/bss.d 1970-01-01 01:00:00.000000000 +0100
+++ 2005-03-31/gas/testsuite/gas/i386/bss.d 2005-03-31 16:17:50.000000000 +0200
@@ -0,0 +1,7 @@
+#objdump: -s
+#name: i386 .bss
+
+.*: +file format .*
+
+Contents of section \.other:
+ 0000 0102 .*
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/bss.s 1970-01-01 01:00:00.000000000 +0100
+++ 2005-03-31/gas/testsuite/gas/i386/bss.s 2005-03-31 16:19:26.000000000 +0200
@@ -0,0 +1,7 @@
+ .data
+ .section .other, "a", @progbits
+ .byte 1
+ .bss
+ .skip 1
+ .previous
+ .byte 2
--- /home/jbeulich/src/binutils/mainline/2005-03-31/gas/testsuite/gas/i386/i386.exp 2005-03-31 16:25:51.000000000 +0200
+++ 2005-03-31/gas/testsuite/gas/i386/i386.exp 2005-03-31 17:10:14.200608560 +0200
@@ -135,3 +135,13 @@ if [expr ([istarget "i*86-*-*"] || [ista
set ASFLAGS "$old_ASFLAGS"
}
+
+if { ([istarget i*86-*-*] || [istarget x86_64-*-*]) } then {
+ if { [istarget *-*-elf*]
+ || [istarget *-*-linux*]
+ && ![istarget *-*-linux*aout*]
+ && ![istarget *-*-linux*oldld*]
+ } then {
+ run_dump_test "bss"
+ }
+}
next reply other threads:[~2005-03-31 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-31 22:56 Jan Beulich [this message]
2005-04-01 7:51 Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s24c2cd3.016@emea1-mh.id2.novell.com \
--to=jbeulich@novell.com \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).