Toolchain issues with pcrel addressing

未關閉
#455 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯

研究方向

未指定任何檔案或測試。首先將 pcrel 工具鏈的五個問題分開:@notoc 呼叫、擴充 inline-asm 定址、帶前綴指令的對齊、r2 配置,以及 mcount 重定位。每項限制都有記錄在案的解決方案,或已向相關工具鏈專案提出該問題,即視為完成。

由索引模型根據 Issue 內容生成。

描述

enhancement incremental

This issue will track some issues with porting the 64-bit kernel to pcrel addressing. Once we have something reasonably working and found no good way to solve these, they should be raised with relevant toolchain projects.

  • @notoc annotation required for function call target symbols. Would be nice to have an assembler option that defaults to notoc (and perhaps could have a @toc annotation if necessary).
  • Extended inline asm addressing. I haven't found a way to use more complex addressing, let alone pcrel addressing in asm constraints.
  • Prefixed instructions require padding to prevent crossing 64 byte boundaries. This causes the assembler to treat delta between symbols containing prefixed instructions as non-constant even if the symbols and instructions are explicitly aligned to avoid padding inserted (e.g., 8 byte alignment for prefix instruction will prevent implicit size change). This prevents them being used in some cases, e.g., in alternate instruction sequences.
  • r2 is unused in pcrel code. Could we have an option to permit the compiler to use it?
  • mcount branches still generate R_PPC64_REL24 relocations. Possible to get gcc to emit @notoc branches for those?
主要語言
沒有語言資料
星號
14
分支
0
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

linuxppc/issues 的其他 Issue

查看 linuxppc/issues 的全部 Issue

相似的 Issue

更多 Compilers Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。