Re: symbol table

2008-04-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
Erik Trulsson <[EMAIL PROTECTED]> writes:
: On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote:
: > Hi,
: > 
: > I have a question about symbol table.
: > One of the section In symbol table is memory adress which symbol is located.
: > I wonder if this memory adress is bound at run-time or compile-time?
: 
: It depends.  Symbols referring to objects in a dynamically loaded library
: will be bound at run-time, the rest should be bound at compile-time.

They are bound at link-time, not compile-time.  This is splitting a
fine hair, but compile-time is when a .o or .so is created, while link
time combines .o-like things together into a bigger thing.  When that
bigger thing is a final link, the addresses for the static portions of
the binary are set.  When the final thing is a dynamic library, the
addresses float (since all the code is PIC anyway, they don't really
matter).  Dynamic parts of executables are bound at run-time.

: > if it is compile-time, I don't understand how do we know whether the symbol
: > is located this adress.
: > Maybe this adress is already bound by other process or like this.
: 
: Each process runs in its own address space, and therefore the compiler
: (actually: the linker) can know exactly where in this address space things
: will end up.

The run-time linker (ld.so) is the one that knows where things wind up
in a given process...  libc.so and other shared libraries can and do
link at different addresses for different processes.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: symbol table

2008-04-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
"emily becker" <[EMAIL PROTECTED]> writes:
: Hi,
: 
: I have a question about symbol table.
: One of the section In symbol table is memory adress which symbol is located.
: I wonder if this memory adress is bound at run-time or compile-time?

Typically, run-time, but there are exceptions.

: if it is compile-time, I don't understand how do we know whether the symbol
: is located this adress.

The exceptions are for things like 'start' which live at a fixed
address by the ELF ABI specification for most processors.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Yarrow's Counter

2008-04-20 Thread RW
On Sat, 19 Apr 2008 23:30:23 +0400
Eygene Ryabinkin <[EMAIL PROTECTED]> wrote:


> I would not do it without consultations with Yarrow's creators:

OK, I didn't realise it was actually specified, I thought it an
implementation detail.

> this modification seems not to help anything, 

It possibly doesn't help with an attack against Yarrow itself, but it
means that 512 bits of entropy, rather than 256 bits, can be read-out
from /dev/random.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: symbol table

2008-04-20 Thread Erik Trulsson
On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote:
> Hi,
> 
> I have a question about symbol table.
> One of the section In symbol table is memory adress which symbol is located.
> I wonder if this memory adress is bound at run-time or compile-time?

It depends.  Symbols referring to objects in a dynamically loaded library
will be bound at run-time, the rest should be bound at compile-time.

> if it is compile-time, I don't understand how do we know whether the symbol
> is located this adress.
> Maybe this adress is already bound by other process or like this.

Each process runs in its own address space, and therefore the compiler
(actually: the linker) can know exactly where in this address space things
will end up.


(The above is true for FreeBSD and just about all other Unix-derived
systems.  Other systems can do things differently.)



-- 

Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


symbol table

2008-04-20 Thread emily becker
Hi,

I have a question about symbol table.
One of the section In symbol table is memory adress which symbol is located.
I wonder if this memory adress is bound at run-time or compile-time?
if it is compile-time, I don't understand how do we know whether the symbol
is located this adress.
Maybe this adress is already bound by other process or like this.

I look forward to answers

thank you
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"