<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.3826.2400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Times New Roman" size=2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Times New Roman" size=2>Thanks again.</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=2>>>> during step 2, we read
*.bc code and find dummy BB and put some<BR>>>> meaningless
machinecode, here, we cannot put some illegal machince<BR>>>> code,
otherwise, step 3 goes to fail.<BR>>><BR>>> Yes, you are correct --
if you want to create illegal code you need to<BR>>> not use system
as. What you need is the ability for llc to create<BR>>> object
files with native code directly, without using the system<BR>>>
assembler. I think someone is working on it, but I'm not sure as to
the<BR>>> status. Otherwise, you will just have some random
one-byte<BR>>> instructions.<BR>><BR>>Actually that's not
true. You can make instructions with an asmstring
of:<BR>><BR>> ".byte 123\n .byte 56\n .byte 86" and those
bytes will get emitted to <BR>>the code stream.<BR></FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>Yes, you are right. The way is like
buffer overflow code in which the instructions exist as asm string in
memory</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>\x123\x35\86......However, I have no
idea how to make it . Would you like giving me idea? Is
there any way I can follow?</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=2>CodeEmitGen.cpp MachineCodeEmitter.cpp
... which one is response for it? </FONT></DIV>
<DIV><FONT face="Times New Roman" size=2></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=2>Thanks.</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>Qiuyu<BR></DIV></FONT></BODY></HTML>