This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: .option directive
- From: Jim Wilson <jimw at sifive dot com>
- To: Paulo Matos <pmatos@linki.tools>, binutils at sourceware dot org
- Date: Fri, 24 Nov 2017 17:22:11 -0800
- Subject: Re: .option directive
- Authentication-results: sourceware.org; auth=none
- References: <bf414cc6-2fa9-e711-8a38-3b02c6d5d7e7@linki.tools>
On 11/24/2017 12:03 AM, Paulo Matos wrote:
When compiling a riscv program, I get at the start of the file:
.file "1818492087.c"
.option nopic
I am curious about the option directive. I can't seem to find it
documented anywhere:
It is a risc-v feature, similar to the MIPS .set directive. Adding
documentation for it is on my todo list. You can only have one word
after the .option. The current choices are rvc, norvc, pic, nopic,
relax, norelax, push, and pop. The last two allow you to stack the
option choices. E.g. if you want a guaranteed 4-byte instruction, and
you are compiling for a target that has compressed instructions, then
you can use
.option push
.option norvc
...instructions...
.option pop
Jim