-
|
作业二和作业三的区别仅仅是偏移量的计算不同吗,没有其他额外的调整需求吗?个人阅读题目和根据所学,感觉只需要在作业二的基础上略微修改就可以了,只需要修改计算偏移量的这一步,然后就没能通过,在任务三卡住了十几个小时 |
Beta Was this translation helpful? Give feedback.
Answered by
508liang
Jan 23, 2025
Replies: 1 comment 5 replies
-
|
已解决 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
确实应该没什么区别,我是前面的没写对,就是任务二中合并section时,偏移量计算有误,我做的调整是假设merged_section已经有来自之前目标文件的数据。当添加新的section的relocs时,这些relocs的offset是相对于该section在原目标文件中的偏移量,而不是合并后的merged_section中的偏移量。然后任务三就改变一下计算方式就行了。