go fmt
This commit is contained in:
@ -139,14 +139,14 @@ func (action *saveImports) saveToInfo(mf *MachoFile) error {
|
||||
|
||||
mf.Info().Main = mc.Main()
|
||||
|
||||
selectors_list := []*protomodel.MachoInfo_Selector{}
|
||||
for _, sel := range mc.CollectSpecialSelectors() {
|
||||
selectors_list = append(selectors_list, &protomodel.MachoInfo_Selector{
|
||||
Idx: uint32(sel.Idx()),
|
||||
Name: sel.Name(),
|
||||
})
|
||||
}
|
||||
mf.Info().SpecialSelectors = selectors_list
|
||||
selectors_list := []*protomodel.MachoInfo_Selector{}
|
||||
for _, sel := range mc.CollectSpecialSelectors() {
|
||||
selectors_list = append(selectors_list, &protomodel.MachoInfo_Selector{
|
||||
Idx: uint32(sel.Idx()),
|
||||
Name: sel.Name(),
|
||||
})
|
||||
}
|
||||
mf.Info().SpecialSelectors = selectors_list
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -302,16 +302,16 @@ func bcell2header(bfile string, header string) {
|
||||
|
||||
fmt.Fprintf(w, "__attribute__((section(\"__DATA,bshield\")))\n")
|
||||
fmt.Fprintf(w, "uint32_t special_selectors_idx[] = {\n")
|
||||
for _, selector := range info.GetSpecialSelectors() {
|
||||
fmt.Fprintf(w, "%x,\n", selector.Idx)
|
||||
}
|
||||
for _, selector := range info.GetSpecialSelectors() {
|
||||
fmt.Fprintf(w, "%x,\n", selector.Idx)
|
||||
}
|
||||
fmt.Fprintf(w, "};\n")
|
||||
|
||||
fmt.Fprintf(w, "__attribute__((section(\"__DATA,bshield\")))\n")
|
||||
fmt.Fprintf(w, "const char* special_selectors_name[] = {\n")
|
||||
for _, selector := range info.GetSpecialSelectors() {
|
||||
fmt.Fprintf(w, "\"%s\",\n", selector.Name)
|
||||
}
|
||||
for _, selector := range info.GetSpecialSelectors() {
|
||||
fmt.Fprintf(w, "\"%s\",\n", selector.Name)
|
||||
}
|
||||
fmt.Fprintf(w, "};\n")
|
||||
fmt.Fprintf(w, "uint32_t n_selectors = %d;\n", len(info.GetSpecialSelectors()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user