(3b2) functions in data space
Daniel R. Levy
levy at ttrdc.UUCP
Tue Mar 18 19:20:24 AEST 1986
Small addendum to my previous posting:
I must give credit to Ehud Reiter (harvard!reiter) for the idea
on how to do this (he answered my question as to how it was accomplished in
Fortran, and I tried it in both f77 and C, and it worked).
I am sure that I am indeed running the data space rather than just capturing
a pointer to the text space, since in another version of the test program I
did a dump of the buffer, which compared identically to a dis(1) disas-
sembly of the LINKED executable section that I copied.
Maybe it would be a good idea to have a "dummy function" which would be copied
into an array then modified as needed, to avoid the nitty gritty problems of
the final linking? (I noticed that a disassembly of the object [.o] file
was a little different than the linked version, having places where ld(1)
evidently must "fill in the blanks" to have a valid sequence of code when
all external symbols are resolved.)
--
------------------------------- Disclaimer: The views contained herein are
| dan levy | yvel nad | my own and are not at all those of my em-
| an engihacker @ | ployer or the administrator of any computer
| at&t computer systems division | upon which I may hack.
| skokie, illinois |
-------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
vax135}!ttrdc!levy
More information about the Comp.lang.c
mailing list