fn want_section_symbol(relocation: &Relocation, symbol: &Symbol) -> bool {
            if symbol.scope != SymbolScope::Dynamic {
                // Only dynamic symbols can be preemptible.
                return false;
            }
            match symbol.kind {
                SymbolKind::Text | SymbolKind::Data => {}
                _ => return false,
            }
            match relocation.kind {
                // Anything using GOT or PLT is preemptible.
                // We also require that `Other` relocations must already be correct.
                RelocationKind::Got
                | RelocationKind::GotRelative
                | RelocationKind::GotBaseRelative
                | RelocationKind::PltRelative
                | RelocationKind::Elf(_) => return false,
                // Absolute relocations are preemptible for non-local data.
                // TODO: not sure if this rule is exactly correct
                // This rule was added to handle global data references in debuginfo.
                // Maybe this should be a new relocation kind so that the caller can decide.
                RelocationKind::Absolute => {
                    if symbol.kind == SymbolKind::Data {
                        return false;
                    }
                }
                _ => {}
            }
            true
        }
// Return true if we should use a section symbol to avoid preemption.
Return true if we should use a section symbol to avoid preemption.
Return true if we should use a section symbol to avoid preemption .
fn want_section_symbol(relocation: &Relocation, symbol: &Symbol) -> bool {
            if symbol.scope != SymbolScope::Dynamic {
                // Only dynamic symbols can be preemptible.
                return false;
            }
            match symbol.kind {
                SymbolKind::Text | SymbolKind::Data => {}
                _ => return false,
            }
            match relocation.kind {
                // Anything using GOT or PLT is preemptible.
                // We also require that `Other` relocations must already be correct.
                RelocationKind::Got
                | RelocationKind::GotRelative
                | RelocationKind::GotBaseRelative
                | RelocationKind::PltRelative
                | RelocationKind::Elf(_) => return false,
                // Absolute relocations are preemptible for non-local data.
                // TODO: not sure if this rule is exactly correct
                // This rule was added to handle global data references in debuginfo.
                // Maybe this should be a new relocation kind so that the caller can decide.
                RelocationKind::Absolute => {
                    if symbol.kind == SymbolKind::Data {
                        return false;
                    }
                }
                _ => {}
            }
            true
        }
fn want_section_symbol ( relocation : & Relocation , symbol : & Symbol ) -> bool { if symbol . scope != SymbolScope :: Dynamic { // Only dynamic symbols can be preemptible. return false ; } match symbol . kind { SymbolKind :: Text | SymbolKind :: Data => { } _ => return false , } match relocation . kind { // Anything using GOT or PLT is preemptible. // We also require that `Other` relocations must already be correct. RelocationKind :: Got | RelocationKind :: GotRelative | RelocationKind :: GotBaseRelative | RelocationKind :: PltRelative | RelocationKind :: Elf ( _ ) => return false , // Absolute relocations are preemptible for non-local data. // TODO: not sure if this rule is exactly correct // This rule was added to handle global data references in debuginfo. // Maybe this should be a new relocation kind so that the caller can decide. RelocationKind :: Absolute => { if symbol . kind == SymbolKind :: Data { return false ; } } _ => { } } true }
Return true if we should use a section symbol to avoid preemption.
Return true if we should use a section symbol to avoid preemption .
relocation
&Relocation
symbol
&Symbol
relocation
&Relocation
symbol
&Symbol