diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2011-05-16 03:28:46 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2011-05-16 03:28:46 +0000 |
commit | 8dbbf2a4ce5f74d3114718aee96f6ca1a3795dca (patch) | |
tree | 8ff6093e75264c937638ccc5fefc9bb4397b6265 /gas | |
parent | 8b25c274b06a5d594d7952e73740f5f20b83e507 (diff) | |
download | binutils-redhat-8dbbf2a4ce5f74d3114718aee96f6ca1a3795dca.tar.gz |
* config/tc-cris.c (md_parse_option) <OPTION_PIC>: Error if not
emitting ELF object.
(md_show_usage): Only mention --pic if the assembler can generate
ELF objects.
* doc/c-cris.texi (CRIS-Opt): Mention that generating ELF is a
prerequisite for --pic being a valid option.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-cris.c | 4 | ||||
-rw-r--r-- | gas/doc/c-cris.texi | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 4098f4d23b..19428f73d2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2011-05-16 Hans-Peter Nilsson <hp@axis.com> + + * config/tc-cris.c (md_parse_option) <OPTION_PIC>: Error if not + emitting ELF object. + (md_show_usage): Only mention --pic if the assembler can generate + ELF objects. + * doc/c-cris.texi (CRIS-Opt): Mention that generating ELF is a + prerequisite for --pic being a valid option. + 2011-05-13 Frederic Marchal <fmarchal@perso.be> PR gas/12755 diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c index 932dbfa9e4..1eb4ad1b02 100644 --- a/gas/config/tc-cris.c +++ b/gas/config/tc-cris.c @@ -3811,6 +3811,8 @@ md_parse_option (int arg, char *argp ATTRIBUTE_UNUSED) break; case OPTION_PIC: + if (OUTPUT_FLAVOR != bfd_target_elf_flavour) + as_bad (_("--pic is invalid for this object format")); pic = TRUE; if (cris_arch != arch_crisv32) md_long_jump_size = cris_any_v0_v10_long_jump_size_pic; @@ -4008,8 +4010,10 @@ md_show_usage (FILE *stream) _(" --no-underscore User symbols do not have any prefix.\n")); fprintf (stream, "%s", _(" Registers will require a `$'-prefix.\n")); +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) fprintf (stream, "%s", _(" --pic Enable generation of position-independent code.\n")); +#endif fprintf (stream, "%s", _(" --march=<arch> Generate code for <arch>. Valid choices for <arch>\n\ are v0_v10, v10, v32 and common_v10_v32.\n")); diff --git a/gas/doc/c-cris.texi b/gas/doc/c-cris.texi index 0ef16b9402..ff27921b4b 100644 --- a/gas/doc/c-cris.texi +++ b/gas/doc/c-cris.texi @@ -67,7 +67,8 @@ order to recognize the symbol syntax used for ELF (SVR4 PIC) position-independent-code (@pxref{crispic}). This will also affect expansion of instructions. The expansion with @option{--pic} will use PC-relative rather than (slightly -faster) absolute addresses in those expansions. +faster) absolute addresses in those expansions. This option is only +valid when generating ELF format object files. @cindex @option{--march=@var{architecture}} command line option, CRIS @cindex CRIS @option{--march=@var{architecture}} command line option |