* Need to create new relocation node
@ 2004-10-30 12:20 Narendra Kiran Chinnam
2004-10-30 14:56 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Narendra Kiran Chinnam @ 2004-10-30 12:20 UTC (permalink / raw)
To: binutils
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.
Regards,
Narendra Kiran CH
VinDynamics Software Eng
Bangalore
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Need to create new relocation node
2004-10-30 12:20 Need to create new relocation node Narendra Kiran Chinnam
@ 2004-10-30 14:56 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2004-10-30 14:56 UTC (permalink / raw)
To: Narendra Kiran Chinnam; +Cc: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-30 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-30 12:20 Need to create new relocation node Narendra Kiran Chinnam
2004-10-30 14:56 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).