public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* static link with relocations
@ 2010-04-16 20:03 b95705030
  2010-04-16 20:24 ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: b95705030 @ 2010-04-16 20:03 UTC (permalink / raw)
  To: binutils

Hello all,

I want to port binutils to a platform(EFI Binary Code Virtual  
Machine). The image of that platform is static link, but they contain  
relocations.

Does binutils have build in assumption that static image don't contain  
relocations??(ie. Does binutils support the model that static image  
contain relocations??)

thanks

yi-hong

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

* Re: static link with relocations
  2010-04-16 20:03 static link with relocations b95705030
@ 2010-04-16 20:24 ` H.J. Lu
  2010-04-17 18:40   ` b95705030
  0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2010-04-16 20:24 UTC (permalink / raw)
  To: b95705030; +Cc: binutils

2010/4/16  <b95705030@ntu.edu.tw>:
> Hello all,
>
> I want to port binutils to a platform(EFI Binary Code Virtual Machine). The
> image of that platform is static link, but they contain relocations.
>
> Does binutils have build in assumption that static image don't contain
> relocations??(ie. Does binutils support the model that static image contain
> relocations??)
>

Do they use the same format as native EFI codes? If yes,
you need to link as PIE. I fixed an PIE bug recently for EFI:

http://www.sourceware.org/bugzilla/show_bug.cgi?id=11396


-- 
H.J.

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

* Re: static link with relocations
  2010-04-16 20:24 ` H.J. Lu
@ 2010-04-17 18:40   ` b95705030
  2010-04-17 18:56     ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: b95705030 @ 2010-04-17 18:40 UTC (permalink / raw)
  Cc: binutils

Hello

[顯示引述 - 13 行][隱藏引述]
I want to port binutils to a platform(EFI Binary Code Virtual Machine). The
image of that platform is static link, but they contain relocations.

Does binutils have build in assumption that static image don't contain
relocations??(ie. Does binutils support the model that static image contain
relocations??)
Do they use the same format as native EFI codes? If yes,
you need to link as PIE. I fixed an PIE bug recently for EFI:

http://www.sourceware.org/bugzilla/show_bug.cgi?id=11396
Yes, they use the same format as native EFI codes(object file format  
COFF, excutable format PE32+).
The problem I ask is because of a discussion of EDK mailing list.
http://sourceforge.net/mailarchive/forum.php?thread_name=7C0E3215-191D-4B58-BC2B-D273281608F1%40apple.com&forum_name=edk2-devel

The memory model of EFI in IA32 is Basic Flat Model(3.2.1 in Intel® 64  
and IA-32 Architectures Software Developer’s Manual Volume 3A:System  
Programming Guide, Part 1), which means every selector defines the  
entire address space.

Because PE/COFF is designed to be run at any address, and determined  
the relocations at loading time. The load address could also change if  
the sequence of loads was different. The source code of loader in EFI  
is:
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Library/BasePeCoffLib/BasePeCoff.c

So I wondering whether binutils support static link image with  
relocation model. I have survey the bug you fixed. In my opinion,  
binutils support this model, Is it??

tnanks for you to be my mentor.

yi-hong


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

* Re: static link with relocations
  2010-04-17 18:40   ` b95705030
@ 2010-04-17 18:56     ` H.J. Lu
  2010-04-19 18:07       ` b95705030
  0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2010-04-17 18:56 UTC (permalink / raw)
  To: b95705030; +Cc: binutils

On Sat, Apr 17, 2010 at 11:40 AM,  <b95705030@ntu.edu.tw> wrote:
> Hello
>
> [顯示引述 - 13 行][隱藏引述]
> I want to port binutils to a platform(EFI Binary Code Virtual Machine). The
> image of that platform is static link, but they contain relocations.
>
> Does binutils have build in assumption that static image don't contain
> relocations??(ie. Does binutils support the model that static image contain
> relocations??)
> Do they use the same format as native EFI codes? If yes,
> you need to link as PIE. I fixed an PIE bug recently for EFI:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=11396
> Yes, they use the same format as native EFI codes(object file format COFF,
> excutable format PE32+).
> The problem I ask is because of a discussion of EDK mailing list.
> http://sourceforge.net/mailarchive/forum.php?thread_name=7C0E3215-191D-4B58-BC2B-D273281608F1%40apple.com&forum_name=edk2-devel
>
> The memory model of EFI in IA32 is Basic Flat Model(3.2.1 in Intel(R) 64 and
> IA-32 Architectures Software Developer's Manual Volume 3A:System Programming
> Guide, Part 1), which means every selector defines the entire address space.
>
> Because PE/COFF is designed to be run at any address, and determined the
> relocations at loading time. The load address could also change if the
> sequence of loads was different. The source code of loader in EFI is:
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
>
> So I wondering whether binutils support static link image with relocation
> model. I have survey the bug you fixed. In my opinion, binutils support this
> model, Is it??

Yes.

> tnanks for you to be my mentor.
>

You are welcome.


-- 
H.J.

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

* Re: static link with relocations
  2010-04-17 18:56     ` H.J. Lu
@ 2010-04-19 18:07       ` b95705030
  2010-04-19 19:20         ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: b95705030 @ 2010-04-19 18:07 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils

Hello,

There is a public review in my proposal which suggest me to reassign  
my proposal to GCC. May I take the liberty to ask that you are mentor  
of GCC or mentor of binutils(GNU)?? Should I ask to reassign my  
proposal to GCC??

my proposal URL is:
http://socghop.appspot.com/gsoc/student_proposal/private/google/gsoc2010/yi_hong/t127065396587

thanks

>> tnanks for you to be my mentor.
>>
>
> You are welcome.

yi-hong

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

* Re: static link with relocations
  2010-04-19 18:07       ` b95705030
@ 2010-04-19 19:20         ` H.J. Lu
  2010-04-20 13:39           ` b95705030
  0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2010-04-19 19:20 UTC (permalink / raw)
  To: b95705030; +Cc: binutils

2010/4/19  <b95705030@ntu.edu.tw>:
> Hello,
>
> There is a public review in my proposal which suggest me to reassign my
> proposal to GCC. May I take the liberty to ask that you are mentor of GCC or
> mentor of binutils(GNU)?? Should I ask to reassign my proposal to GCC??

It is my first time to be involved with gsoc.  I don't know they match
project with mentor. Can you find my name, hjl, on gsoc website?

I think your EFI binutils should be placed under the GNU project.

> my proposal URL is:
> http://socghop.appspot.com/gsoc/student_proposal/private/google/gsoc2010/yi_hong/t127065396587

I don't have access to it.


H.J.
> thanks
>
>>> tnanks for you to be my mentor.
>>>
>>
>> You are welcome.
>
> yi-hong
>
>



-- 
H.J.

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

* Re: static link with relocations
  2010-04-19 19:20         ` H.J. Lu
@ 2010-04-20 13:39           ` b95705030
  2010-04-20 13:49             ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: b95705030 @ 2010-04-20 13:39 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils

Hello,

> 2010/4/19  <b95705030@ntu.edu.tw>:
>> Hello,
>>
>> There is a public review in my proposal which suggest me to reassign my
>> proposal to GCC. May I take the liberty to ask that you are mentor of GCC or
>> mentor of binutils(GNU)?? Should I ask to reassign my proposal to GCC??
>
> It is my first time to be involved with gsoc.  I don't know they match
> project with mentor. Can you find my name, hjl, on gsoc website?
>
> I think your EFI binutils should be placed under the GNU project.
>
>> my proposal URL is:
>> http://socghop.appspot.com/gsoc/student_proposal/private/google/gsoc2010/yi_hong/t127065396587
>
> I don't have access to it.

Could you have access to it when I first time ask for mentor in  
binutils mailing list(in this message  
http://sourceware.org/ml/binutils/2010-04/msg00192.html)?? Because my  
proposal has been moved to GCC and you don't have access to it, means  
that you may be mentor of binutils(GNU). And I must to ask GSoC to  
move my proposal back.

I have seen a discussion thread in gsoc of gnu mailing list, which URL  
is  
http://lists.gnu.org/archive/html/summer-of-code/2010-04/msg00011.html. Would  
you mind to tell me whether my proposal is pending or not??

thanks

yi-hong


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

* Re: static link with relocations
  2010-04-20 13:39           ` b95705030
@ 2010-04-20 13:49             ` H.J. Lu
  0 siblings, 0 replies; 8+ messages in thread
From: H.J. Lu @ 2010-04-20 13:49 UTC (permalink / raw)
  To: b95705030; +Cc: binutils

On Tue, Apr 20, 2010 at 6:39 AM,  <b95705030@ntu.edu.tw> wrote:
> Hello,
>
>> 2010/4/19  <b95705030@ntu.edu.tw>:
>>>
>>> Hello,
>>>
>>> There is a public review in my proposal which suggest me to reassign my
>>> proposal to GCC. May I take the liberty to ask that you are mentor of GCC
>>> or
>>> mentor of binutils(GNU)?? Should I ask to reassign my proposal to GCC??
>>
>> It is my first time to be involved with gsoc.  I don't know they match
>> project with mentor. Can you find my name, hjl, on gsoc website?
>>
>> I think your EFI binutils should be placed under the GNU project.
>>
>>> my proposal URL is:
>>>
>>> http://socghop.appspot.com/gsoc/student_proposal/private/google/gsoc2010/yi_hong/t127065396587
>>
>> I don't have access to it.
>
> Could you have access to it when I first time ask for mentor in binutils
> mailing list(in this message
> http://sourceware.org/ml/binutils/2010-04/msg00192.html)?? Because my
> proposal has been moved to GCC and you don't have access to it, means that
> you may be mentor of binutils(GNU). And I must to ask GSoC to move my
> proposal back.

Please do.

> I have seen a discussion thread in gsoc of gnu mailing list, which URL is
> http://lists.gnu.org/archive/html/summer-of-code/2010-04/msg00011.html.
> Would you mind to tell me whether my proposal is pending or not??
>

I have no idea of your proposal status. I can't even look at it.

-- 
H.J.

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

end of thread, other threads:[~2010-04-20 13:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16 20:03 static link with relocations b95705030
2010-04-16 20:24 ` H.J. Lu
2010-04-17 18:40   ` b95705030
2010-04-17 18:56     ` H.J. Lu
2010-04-19 18:07       ` b95705030
2010-04-19 19:20         ` H.J. Lu
2010-04-20 13:39           ` b95705030
2010-04-20 13:49             ` H.J. Lu

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