This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Need to create new relocation node
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Narendra Kiran Chinnam <narendrakiran at yahoo dot co dot in>
- Cc: binutils at sources dot redhat dot com
- Date: 30 Oct 2004 10:56:07 -0400
- Subject: Re: Need to create new relocation node
- References: <20041030122016.68775.qmail@web8501.mail.in.yahoo.com>
Narendra Kiran Chinnam <narendrakiran@yahoo.co.in> writes:
> When Iam trying to call a static function from another
> function, a 'jmp' instruction is placed instead of
> 'call' instruction. I have used "-O2" optimization.
> Without optimization flag, 'call' instruction is
> placed as expected. It is required that a relocation
> node be generated for function call. I have modified
> gas to emit relocations for static function calls. But
> when -O2 flag is used no relocation is generated. Now
> I need to make sure that a relocation is generated for
> every 'jmp' instruction whose target is a function. I
> tried modifying "md_convert_flag" in "tc-i386.c", but
> to no avail. I would appreciate any help that would
> solve this problem.
What is generating the jmp instruction? Sounds like you need to
modify the compiler, not the assembler. You may want to try the
compiler option -fno-optimize-sibling-calls.
Ian