PR gas/12011
* config/obj-elf.c (obj_elf_parse_section_letters): Correct test for error return from md_elf_section_letter. * config/tc-alpha.c (alpha_elf_section_letter): Correct error message. * config/tc-i386.c (x86_64_section_letter): Likewise. * config/tc-ia64.c (ia64_elf_section_letter): Likewise. * config/tc-mep.c (mep_elf_section_letter): Likewise. * gas/elf/bad-section-flag.d, * gas/elf/bad-section-flag.err, * gas/elf/bad-section-flag.s: New test. * gas/elf/elf.exp: Run it.
This commit is contained in:
parent
1558ab4ce7
commit
8f3bae4520
@ -1,3 +1,13 @@
|
||||
2010-09-17 Andrew Burgess <aburgess@broadcom.com>
|
||||
|
||||
PR gas/12011
|
||||
* config/obj-elf.c (obj_elf_parse_section_letters): Correct test
|
||||
for error return from md_elf_section_letter.
|
||||
* config/tc-alpha.c (alpha_elf_section_letter): Correct error message.
|
||||
* config/tc-i386.c (x86_64_section_letter): Likewise.
|
||||
* config/tc-ia64.c (ia64_elf_section_letter): Likewise.
|
||||
* config/tc-mep.c (mep_elf_section_letter): Likewise.
|
||||
|
||||
2010-09-15 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* config/obj-coff-seh.c (seh_validate_seg): New funtion.
|
||||
|
@ -794,7 +794,7 @@ obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *clone)
|
||||
char *bad_msg = _("unrecognized .section attribute: want a,e,w,x,M,S,G,T");
|
||||
#ifdef md_elf_section_letter
|
||||
bfd_vma md_attr = md_elf_section_letter (*str, &bad_msg);
|
||||
if (md_attr > 0)
|
||||
if (md_attr != (bfd_vma) -1)
|
||||
attr |= md_attr;
|
||||
else
|
||||
#endif
|
||||
|
@ -5364,7 +5364,7 @@ alpha_elf_section_letter (int letter, char **ptr_msg)
|
||||
if (letter == 's')
|
||||
return SHF_ALPHA_GPREL;
|
||||
|
||||
*ptr_msg = _("Bad .section directive: want a,s,w,x,M,S,G,T in string");
|
||||
*ptr_msg = _("bad .section directive: want a,s,w,x,M,S,G,T in string");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -8949,10 +8949,10 @@ x86_64_section_letter (int letter, char **ptr_msg)
|
||||
if (letter == 'l')
|
||||
return SHF_X86_64_LARGE;
|
||||
|
||||
*ptr_msg = _("Bad .section directive: want a,l,w,x,M,S,G,T in string");
|
||||
*ptr_msg = _("bad .section directive: want a,l,w,x,M,S,G,T in string");
|
||||
}
|
||||
else
|
||||
*ptr_msg = _("Bad .section directive: want a,w,x,M,S,G,T in string");
|
||||
*ptr_msg = _("bad .section directive: want a,w,x,M,S,G,T in string");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -861,7 +861,7 @@ ia64_elf_section_letter (int letter, char **ptr_msg)
|
||||
return SHF_IA_64_VMS_GLOBAL;
|
||||
#endif
|
||||
|
||||
*ptr_msg = _("Bad .section directive: want a,o,s,w,x,M,S,G,T in string");
|
||||
*ptr_msg = _("bad .section directive: want a,o,s,w,x,M,S,G,T in string");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2086,8 +2086,8 @@ mep_elf_section_letter (int letter, char **ptrmsg)
|
||||
if (letter == 'v')
|
||||
return SHF_MEP_VLIW;
|
||||
|
||||
*ptrmsg = _("Bad .section directive: want a,v,w,x,M,S in string");
|
||||
return 0;
|
||||
*ptrmsg = _("bad .section directive: want a,v,w,x,M,S in string");
|
||||
return -1;
|
||||
}
|
||||
|
||||
flagword
|
||||
|
@ -1,3 +1,10 @@
|
||||
2010-09-17 Andrew Burgess <aburgess@broadcom.com>
|
||||
|
||||
PR gas/12011
|
||||
* gas/elf/bad-section-flag.d, * gas/elf/bad-section-flag.err,
|
||||
* gas/elf/bad-section-flag.s: New test.
|
||||
* gas/elf/elf.exp: Run it.
|
||||
|
||||
2010-09-16 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* gas/all/redef3.d: Don't run on arc.
|
||||
|
2
gas/testsuite/gas/elf/bad-section-flag.d
Normal file
2
gas/testsuite/gas/elf/bad-section-flag.d
Normal file
@ -0,0 +1,2 @@
|
||||
#name: Check bad section flag
|
||||
#error-output: bad-section-flag.err
|
2
gas/testsuite/gas/elf/bad-section-flag.err
Normal file
2
gas/testsuite/gas/elf/bad-section-flag.err
Normal file
@ -0,0 +1,2 @@
|
||||
.*bad-section-flag\.s: Assembler messages:
|
||||
.*bad-section-flag\.s:1: Fatal error: .*
|
1
gas/testsuite/gas/elf/bad-section-flag.s
Normal file
1
gas/testsuite/gas/elf/bad-section-flag.s
Normal file
@ -0,0 +1 @@
|
||||
.section ".rodata", "z~&q"
|
@ -167,4 +167,5 @@ if { ([istarget "*-*-*elf*"]
|
||||
run_dump_test "dwarf2-1"
|
||||
run_dump_test "dwarf2-2"
|
||||
run_dump_test "dwarf2-3"
|
||||
run_dump_test "bad-section-flag"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user