我正在尝试将elf文件加载到我制作的MIPS模拟器中.我遇到的问题是我不太明白精灵部分标题偏移背后的含义.当我进行段转储时,段25-31和33-35在0x00000000处"开始",但是标题表明该段以某个值的偏移量开始(例如010190).同样在-S部分的开头,readelf声明头部在内存中以0x107b4开始.但是在-S中可以看到,最早的内存分配(因为段0为空)实际上位于偏移010210的段26中.有人可以解释这里发生了什么吗?我想静态地将所有这个文件分配到一个内存数组中.是否有一些关于抵消的假设阻止我这样做?为什么readelf说0x107b4是标题起点?
另外,.init在将PC放在readelf指定的"入口点"之前,我应该运行吗?
编辑:好的,所以,我做了一个可执行文件的十六进制转储,我现在意识到偏移是指实际elf文件中的位置(包含"地址"0 - 11d48的元素.)所以我现在的问题是. ..如何解决许多内存地址引用地址0x00000000的事实?它们当然有不同的偏移但现在我知道这是特定于文件的,它意味着有几个部分别名.我是否真的在内存寻址中使用偏移量?
第25部分:
0x00000000 00474343 3a202847 4e552920 332e342e .GCC: (GNU) 3.4.
0x00000010 35000047 43433a20 ...
Run Code Online (Sandbox Code Playgroud)
Readelf -S 输出:
There are 36 section headers, starting at offset 0x107b4:
Run Code Online (Sandbox Code Playgroud)
章节标题:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 00400134 000134 00000d 00 A 0 0 1
[ 2] .note.ABI-tag NOTE 00400144 000144 000020 00 A 0 0 4
[ …Run Code Online (Sandbox Code Playgroud) 我将像这样传递xml文件:
File1.PostedFile.InputStream
//reading xml file.....
public static void readXMLOutput(Stream stream)
{
System.Xml.Linq.XDocument xml = System.Xml.Linq.XDocument.Load(stream);
var query = from p in xml.Element("ste").Element("Application")
//where (int)p.Element("Id") == 1
select Page;
foreach (var record in query)
{
Response.Write("dfe") + record.Element("dfe").Value;
}
Run Code Online (Sandbox Code Playgroud)
错误:
错误1'System.Xml.Linq.XDocument.Load(string)'的最佳重载方法匹配有一些无效的参数
无法从'System.IO.Stream'转换为'string'
我收到链接器的错误,例如:
osd.o(.ndata+0x514):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\osd.c: multiple definition of `video_buff_vis_num'
main.o(.ndata+0x0):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\main.c: first defined here
osd.o(.ndata+0x515):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\osd.c: multiple definition of `video_buff_draw_num'
main.o(.ndata+0x1):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\main.c: first defined here
osd.o(.ndata+0x516):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\osd.c: multiple definition of `vid_format'
main.o(.ndata+0x2):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\main.c: first defined here
osd.o(.ndata+0x518):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\osd.c: multiple definition of `vid_line'
main.o(.ndata+0x4):C:\Documents and Settings\Thomas\My Documents\PIC\dsPIC33FJ128GP802\On Screen Display\main.c: first defined here
Run Code Online (Sandbox Code Playgroud)
这让我感到烦恼,因为在源代码中,我已经包含了这些定义可能来自唯一地方的警卫.
#ifndef OSD_H …Run Code Online (Sandbox Code Playgroud) 背景: 我正在为Outlook 2007添加VSTO 4.0,使用户能够将其邮件项目传输到CRM数据库.
要求: 安装必须在用户不知情的情况下保持沉默.它将位于Installer类的Custom Action中,或者将从shell命令运行.
问题: 安装以静默方式进行,但实际上并未安装添加.非静默模式下的安装成功完成(但用户收到提示)
安全性: 清单使用企业信任的证书(*.pfx)签名
错误日志: 静默安装的消息: 异常:此应用程序中的自定义功能不起作用,因为它尚未被授予信任.用于签署部署清单的证书未知,自定义本身(FulcrumAddin)不在包含列表中.请联系您的管理员以获得进一
最后一个问题: 静默安装的要求是什么?什么是包含列表(来自:错误日志)以及它如何帮助.
我正在使用以下代码根据鼠标位置滚动图层:
$(".icons").animate({scrollTo:x},duration);
Run Code Online (Sandbox Code Playgroud)
然而,它可以找到,我发现向右移动时滚动速度要快得多.还注意到,如果滚动条在左侧开始并向右滚动一点,然后再向右滚动它,它真的很慢.我假设使用持续时间参数不能最好地控制实际滚动速度,但我不确定如何控制速度.无论滚动条在哪里,我都希望保持一致的速度.
有什么指针吗?
谢谢
如果我有一个像下面的字符串...什么是正则表达式删除(可选)前导和尾随双引号?对于额外的功劳,它还可以删除引号之外的任何可选空格:
string input = "\"quoted string\"" -> quoted string
string inputWithWhiteSpace = " \"quoted string\" " => quoted string
Run Code Online (Sandbox Code Playgroud)
(对于使用Regex.Replace的C#)
我试图在Clojure REPL中为RDF clj-plaza加载Clojure库,如下所示:
user=> (use 'plaza.rdf.core)
nil
Run Code Online (Sandbox Code Playgroud)
我有一个名为plaza的文件夹,以及一个名为rdf的子文件夹和文件core.clj,据我所知,Clojure REPL可以加载库.
现在,如果我这样做
user=> (alter-root-rdf-ns “http://www.example.org/”)
"http://www.example.org"
Run Code Online (Sandbox Code Playgroud)
而且,据我所知,core.clj库正在报告它应该.现在我做
(def e (document-to-model “http://www.snee.com/rdf/elvisimp.rdf” :xml))
java.lang.IllegalArgumentException: No implementation of method: :load-stream of protocol: #’plaza.rdf.core/RDFModel found for class: nil (NO_SOURCE_FILE:2)
Run Code Online (Sandbox Code Playgroud)
如果我尝试f.ex,我会得到相同的结果.
(make-triples [["http://triple1" "http://triple2" "http://triple3"]])
Run Code Online (Sandbox Code Playgroud)
在源代码(core.clj)中,协议RDFModel中有一个名为load-stream的方法
(defprotocol RDFModel
"Operations for the manipulation of RDF"
....
(load-stream [model stream format] "Load triples from a stream")
....
Run Code Online (Sandbox Code Playgroud)
并且实现了加载流
(defn document-to-model
"Adds a set of triples read from a serialized document into a model"
([stream format] …Run Code Online (Sandbox Code Playgroud) 在Swing-app中可以System.exit()从任何线程调用吗?(例如在美国东部时间?)
我正试图找到解决问题的方法.将我的.net 4.0 C#Win服务项目更改为任何CPU/Release构建配置后,我收到此编译时错误:
Cannot specify /main if building a module or library
它将违规文件标识为"CSC",生成它的项目是我的服务项目(不是我在解决方案中附带的代码库).我查看了项目文件和配置编辑器设置但尚未能确定问题的根源.
有没有其他人经历过这个节目停止问题?