diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-04-09 21:23:40 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-04-09 21:23:40 +0100 |
commit | 668c5ebc0937ab5288d831d65de3057e56e2763f (patch) | |
tree | 8e254249c8aae86d8d3f4eae4789167a1b45c893 /gas/config/tc-mips.c | |
parent | 2e88a1ea30deecac47d89b03f6d60ca04245c36f (diff) | |
download | gdb-668c5ebc0937ab5288d831d65de3057e56e2763f.zip gdb-668c5ebc0937ab5288d831d65de3057e56e2763f.tar.gz gdb-668c5ebc0937ab5288d831d65de3057e56e2763f.tar.bz2 |
MIPS/GAS: Disallow `.option picX' with VxWorks PIC
gas/
* config/tc-mips.c (s_option): Reject `.option picX' if VxWorks
PIC.
* testsuite/gas/mips/option-pic-vxworks-1.l: New list test.
* testsuite/gas/mips/option-pic-vxworks-2.l: New list test.
* testsuite/gas/mips/option-pic-vxworks-1.s: New test source.
* testsuite/gas/mips/option-pic-vxworks-2.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index dff78ac..7017444 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -15477,15 +15477,17 @@ s_option (int x ATTRIBUTE_UNUSED) int i; i = atoi (opt + 3); - if (i == 0) + if (i != 0 && i != 2) + as_bad (_(".option pic%d not supported"), i); + else if (mips_pic == VXWORKS_PIC) + as_bad (_(".option pic%d not supported in VxWorks PIC mode"), i); + else if (i == 0) mips_pic = NO_PIC; else if (i == 2) { mips_pic = SVR4_PIC; mips_abicalls = TRUE; } - else - as_bad (_(".option pic%d not supported"), i); if (mips_pic == SVR4_PIC) { |