home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume42
/
elfdis
/
part02
/
sparc_relocations
< prev
next >
Wrap
Text File
|
1994-05-08
|
419b
|
18 lines
#!/bin/sh
#
# print out a working switch() based on sparc relocations
#
echo "#include <stdio.h>"
echo "#include <elf.h>"
echo "#include <sys/elf_SPARC.h>"
echo "char *relocation_type(type)"
echo "int type;"
echo "{"
echo "char *bpType = NULL;"
echo "switch (type) {"
grep R_SPARC /usr/include/sys/elf_SPARC.h |
awk '/^/ { printf "\tcase %s: bpType = \"%s\"; break;\n", $2, $2}'
echo "}"
echo "return bpType;"
echo "}"