Am Sun, 8 Apr 2012 19:14:22 -0700
schrieb "H. S. Teoh" <hst...@quickfur.ath.cx>:

> On Mon, Apr 09, 2012 at 10:59:26AM +1000, Daniel Murphy wrote:
> > "Artur Skawina" <art.08...@gmail.com> wrote in message 
> > news:mailman.1480.1333900846.4860.digitalmar...@puremagic.com...
> > >
> > > Note that my point is just that the compiler needs to emit a dummy
> > > so that the addresses remain unique, eg
> > >
> > >   module.f!uint:
> > >       jmp module.f!int
> > >
> > 
> > Or use a nop slide before the start of the function.  Since we're
> > modifying the object file format anyway, it would be trivial for the
> > compiler to mark functions which have their address taken as needing a
> > unique address. 
> [...]
> 
> Why is it so important to have unique addresses for functions?
> 
> 
> T

I would like to know that use case as well, especially since I learned coding 
with the "copy&paste code is bad" phrase. It just seems odd to me to expect any 
constant data/code to have unique addresses when they can be merged or 
overlapped.

-- 
Marco

Reply via email to