mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
Add Debug implementations for sections
This commit is contained in:
parent
a61987e032
commit
9e6147a9de
2 changed files with 26 additions and 1 deletions
|
@ -174,6 +174,7 @@ impl<'a> Serialize for RelocationSection<'a> {
|
|||
*******************************************************************/
|
||||
|
||||
/// Linking metadata for data segments
|
||||
#[derive(Debug)]
|
||||
pub struct LinkingSegment {
|
||||
pub name: String,
|
||||
pub alignment: Align,
|
||||
|
@ -187,6 +188,7 @@ impl Serialize for LinkingSegment {
|
|||
}
|
||||
|
||||
/// Linking metadata for init (start) functions
|
||||
#[derive(Debug)]
|
||||
pub struct LinkingInitFunc {
|
||||
pub priority: u32,
|
||||
pub symbol_index: u32, // index in the symbol table, not the function index
|
||||
|
@ -213,6 +215,7 @@ pub enum ComdatSymKind {
|
|||
Section = 5,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ComdatSym {
|
||||
pub kind: ComdatSymKind,
|
||||
pub index: u32,
|
||||
|
@ -229,6 +232,7 @@ impl Serialize for ComdatSym {
|
|||
/// The linker will include all of these elements with a given group name from one object file,
|
||||
/// and will exclude any element with this group name from all other object files.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub struct LinkingComdat<'a> {
|
||||
name: String,
|
||||
flags: u32,
|
||||
|
@ -413,6 +417,7 @@ impl Serialize for SymInfo {
|
|||
// Linking subsections
|
||||
//----------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum LinkingSubSection<'a> {
|
||||
/// Extra metadata about the data segments.
|
||||
SegmentInfo(Vec<'a, LinkingSegment>),
|
||||
|
@ -454,6 +459,7 @@ impl<'a> Serialize for LinkingSubSection<'a> {
|
|||
|
||||
const LINKING_VERSION: u8 = 2;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LinkingSection<'a> {
|
||||
pub subsections: Vec<'a, LinkingSubSection<'a>>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue