comp.lang.ada
 help / color / mirror / Atom feed
* Locating a subprogram at user-specified address
@ 2001-06-12 14:30 jaya
  2001-06-12 14:36 ` Ted Dennison
  0 siblings, 1 reply; 4+ messages in thread
From: jaya @ 2001-06-12 14:30 UTC (permalink / raw)


Hello,

My query is : How do I locate a subprogram or package at a known memory 
address. Using "to_address" attribute works only for objects(user-defined 
variables) and not for subprograms or packages.  

Thanks in advance,
Jaya


--
Posted via CNET Help.com
http://www.help.com/



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

* Re: Locating a subprogram at user-specified address
  2001-06-12 14:30 Locating a subprogram at user-specified address jaya
@ 2001-06-12 14:36 ` Ted Dennison
  2001-06-12 15:29   ` Marin David Condic
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Dennison @ 2001-06-12 14:36 UTC (permalink / raw)


In article <tic9rgqlp8fnc1@corp.supernews.com>, jaya says...
>My query is : How do I locate a subprogram or package at a known memory 
>address. Using "to_address" attribute works only for objects(user-defined 
>variables) and not for subprograms or packages.  

Do you mean that you want your subprogram to be put there, or that you know
there is already one there, and you want to call it?

If the former, its a linker/loader issue. If its the latter, I suspect there's
some gymnastics you can perform with System.Address_To_Access_Conversions and
subprogram pointers.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



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

* Re: Locating a subprogram at user-specified address
  2001-06-12 14:36 ` Ted Dennison
@ 2001-06-12 15:29   ` Marin David Condic
  2001-06-12 17:27     ` tmoran
  0 siblings, 1 reply; 4+ messages in thread
From: Marin David Condic @ 2001-06-12 15:29 UTC (permalink / raw)


I seem to recall in Ada you could do some version of "for-use-at" for a
subprogram to get it to a specific address. Or even "for
Subprogram_Name'Address use ..." which I think is described in 13.3(10)
(Then you got to fight with the linker trying to tell it: "No. I *really*
meant to do that!") Details would be specified in Chapter 13 if so & then
you get to go looking for your compiler documentation to see what
Implementation Defined Restrictions are placed on it.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Ted Dennison" <dennison@telepath.com> wrote in message
news:5OpV6.5250$pb1.200601@www.newsranger.com...
> In article <tic9rgqlp8fnc1@corp.supernews.com>, jaya says...
> >My query is : How do I locate a subprogram or package at a known memory
> >address. Using "to_address" attribute works only for objects(user-defined
> >variables) and not for subprograms or packages.
>
> Do you mean that you want your subprogram to be put there, or that you
know
> there is already one there, and you want to call it?
>
> If the former, its a linker/loader issue. If its the latter, I suspect
there's
> some gymnastics you can perform with System.Address_To_Access_Conversions
and
> subprogram pointers.
>
> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>           home email - mailto:dennison@telepath.com





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

* Re: Locating a subprogram at user-specified address
  2001-06-12 15:29   ` Marin David Condic
@ 2001-06-12 17:27     ` tmoran
  0 siblings, 0 replies; 4+ messages in thread
From: tmoran @ 2001-06-12 17:27 UTC (permalink / raw)


>I seem to recall in Ada you could do some version of "for-use-at" for a
>subprogram to get it to a specific address. Or even "for
>Subprogram_Name'Address use ..." which I think is described in 13.3(10)
  And further:
  13.3(12) "Address may be specified for stand-alone objects and for
program units via an attribute_definition_clause."
  13.3(20) "The specification of a link name in a pragma Export (see
B.1) for a subprogram or object is an alternative to explicit
specification of its link-time address, allowing a link-time
directive to place the subprogram or object within memory."



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

end of thread, other threads:[~2001-06-12 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-12 14:30 Locating a subprogram at user-specified address jaya
2001-06-12 14:36 ` Ted Dennison
2001-06-12 15:29   ` Marin David Condic
2001-06-12 17:27     ` tmoran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox