This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .option directive


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]