public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [gas question]relocate type of function call in i386
@ 2017-01-05 10:34 zet
  2017-01-05 15:19 ` zet
  0 siblings, 1 reply; 2+ messages in thread
From: zet @ 2017-01-05 10:34 UTC (permalink / raw)
  To: binutils

Hello, gas(GNU as) developers.

I only talk about i386.

When gas deal with this assembly code:

---------------------------
call function_name
---------------------------

In static NO PIC, the relocation type of function_name in call
instruction must be R_386_PC32?
Is it possible R_386_32 in gas(GNU as)?

thx.

-- 
业精于勤,荒于嬉.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gas question]relocate type of function call in i386
  2017-01-05 10:34 [gas question]relocate type of function call in i386 zet
@ 2017-01-05 15:19 ` zet
  0 siblings, 0 replies; 2+ messages in thread
From: zet @ 2017-01-05 15:19 UTC (permalink / raw)
  To: binutils

Well reading the gas source code I have found the answer.

binutils-source/gas/config/tc-i386.c

output_insn()
  output_jump()
    reloc()

When call the reloc() pass the 2ed argument :1, means it is PC-relative



2017-01-05 18:34 GMT+08:00 zet <feqin1023@gmail.com>:
> Hello, gas(GNU as) developers.
>
> I only talk about i386.
>
> When gas deal with this assembly code:
>
> ---------------------------
> call function_name
> ---------------------------
>
> In static NO PIC, the relocation type of function_name in call
> instruction must be R_386_PC32?
> Is it possible R_386_32 in gas(GNU as)?
>
> thx.
>
> --
> 业精于勤,荒于嬉.



-- 
业精于勤,荒于嬉.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-05 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-05 10:34 [gas question]relocate type of function call in i386 zet
2017-01-05 15:19 ` zet

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).