From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Cc: Alan Modra <amodra@gmail.com>
Subject: Re: PR12519 ELF .size expressions
Date: Fri, 25 Feb 2011 17:01:00 -0000 [thread overview]
Message-ID: <AANLkTikqDaxDoQByjGC2SaqsjHgaTZiD6QG3mCvmwi-M@mail.gmail.com> (raw)
In-Reply-To: <20110225134026.GC5959@bubble.grove.modra.org>
On Fri, Feb 25, 2011 at 5:40 AM, Alan Modra <amodra@gmail.com> wrote:
> Fixes code handling ELF .size expressions that can't be evaluated
> immediately for some reasone, for example if the .size directive was
> given at the beginning of the function referencing a label at the end
> of the function. Also corrects a couple of errors in the testsuite
> that the old .size code wrongly accepted.
>
> gas/
> PR gas/12519
> * config/obj-elf.c (elf_frob_symbol): Properly handle size expression.
> ld/testsuite/
> * ld-mn10300/i135409-3.s: Correct .size label reference.
> * ld-sh/sh64/stolib.s: Likewise.
>
I checked in this testcase.
--
H.J.
---
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 50c23da..4bb775d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/12519
+ * gas/elf/bad-size.d: New.
+ * gas/elf/bad-size.err: Likewise.
+ * gas/elf/bad-size.s: Likewise.
+
+ * gas/elf/elf.exp: Run bad-size.
+
2011-02-13 Mike Frysinger <vapier@gentoo.org>
* gas/bfin/arithmetic.d, gas/bfin/parallel.d: Change A0 to A1.
diff --git a/gas/testsuite/gas/elf/bad-size.d b/gas/testsuite/gas/elf/bad-size.d
new file mode 100644
index 0000000..a313293
--- /dev/null
+++ b/gas/testsuite/gas/elf/bad-size.d
@@ -0,0 +1,2 @@
+#name: Check bad size directive
+#error-output: bad-size.err
diff --git a/gas/testsuite/gas/elf/bad-size.err
b/gas/testsuite/gas/elf/bad-size.err
new file mode 100644
index 0000000..5e01ef2
--- /dev/null
+++ b/gas/testsuite/gas/elf/bad-size.err
@@ -0,0 +1,2 @@
+.*bad-size\.s: Assembler messages:
+.*bad-size\.s:6: Error: .*
diff --git a/gas/testsuite/gas/elf/bad-size.s b/gas/testsuite/gas/elf/bad-size.s
new file mode 100644
index 0000000..c982779
--- /dev/null
+++ b/gas/testsuite/gas/elf/bad-size.s
@@ -0,0 +1,6 @@
+ .text
+_test_nop:
+ .byte 0
+ .section .text.entry.continue, "xa"
+ .byte 0
+ .size _test_nop, .-_test_nop
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index f21d838..8bfeb95 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -182,4 +182,5 @@ if { ([istarget "*-*-*elf*"]
run_dump_test "dwarf2-3"
run_dump_test "dwarf2-4"
run_dump_test "bad-section-flag"
+ run_dump_test "bad-size"
}
prev parent reply other threads:[~2011-02-25 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 13:40 Alan Modra
2011-02-25 17:01 ` H.J. Lu [this message]
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=AANLkTikqDaxDoQByjGC2SaqsjHgaTZiD6QG3mCvmwi-M@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
/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).