(command.CommandList children: [ (command.ShFunction name_tok: <usage> name: usage body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Usage: embedspu [flags] symbol_name input_filename output_filename'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <' input_filename: SPU ELF executable to be embedded'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <' output_filename: Resulting PowerPC object file'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <' symbol_name: Name of program handle struct to be defined'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <' flags: GCC flags defining PowerPC object file format'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <' (e.g. -m32 or -m64)'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShAssignment left: <Id.Lit_VarLike 'program_transform_name='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'program_transform_name='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'program_transform_name='> name: program_transform_name ) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'mydir='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'mydir='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'mydir='> name:mydir) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <dirname> more_env: [] words: [{<dirname>} {(DQ ($ Id.VSub_Number 0))}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShFunction name_tok: <find_prog> name: find_prog body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'prog='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prog='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_Number 1)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {(DQ ($ Id.VSub_DollarName program_transform_name))}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'prog='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prog='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName mydir) <'/'> ($ Id.VSub_DollarName prog))} ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-x>} {(DQ ($ Id.VSub_DollarName prog))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ops: [<Id.Op_DAmp _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'prog='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prog='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName mydir) <'/'> ($ Id.VSub_Number 1))} ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-x>} {(DQ ($ Id.VSub_DollarName prog))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ops: [<Id.Op_DAmp _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'prog='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prog='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_Number 1)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {(DQ ($ Id.VSub_DollarName program_transform_name))}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <which> more_env: [] words: [{<which>} {($ Id.VSub_DollarName prog)}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ops: [<Id.Op_DAmp _>] ) (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShAssignment left: <Id.Lit_VarLike 'SYMBOL='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'SYMBOL='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SYMBOL='> name:SYMBOL) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'INFILE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'INFILE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'INFILE='> name:INFILE) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'OUTFILE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'OUTFILE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OUTFILE='> name:OUTFILE) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'FLAGS='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'FLAGS='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAGS='> name:FLAGS) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ShFunction name_tok: <parse_args> name: parse_args body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-n>} {(DQ ($ Id.VSub_Number 1))}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <-> pattern: (pat.Words words:[{<-> <Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'FLAGS='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'FLAGS='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FLAGS='> name:FLAGS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name FLAGS) <' '> ($ Id.VSub_Number 1))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName SYMBOL))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'SYMBOL='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'SYMBOL='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'SYMBOL='> name: SYMBOL ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} ) ] redirects: [] ) ] spids: [313 324] ) (IfArm keyword: <Id.KW_Elif elif> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName INFILE))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'INFILE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'INFILE='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'INFILE='> name: INFILE ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} ) ] redirects: [] ) ] spids: [333 344] ) (IfArm keyword: <Id.KW_Elif elif> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName OUTFILE))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'OUTFILE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'OUTFILE='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'OUTFILE='> name: OUTFILE ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} ) ] redirects: [] ) ] spids: [353 364] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Too many arguments!'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.Simple blame_tok: <shift> more_env: [] words: [{<shift>}] redirects: [] do_fork: T ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName OUTFILE))}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) ] spids: [400 411] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<Id.KW_Bang '!'>} {<-r>} {(DQ ($ Id.VSub_DollarName INFILE))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ (${ Id.VSub_Name INFILE) <': File not found'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) ] spids: [420 433] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <main> name: main body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <parse_args> more_env: [] words: [{<parse_args>} {(DQ ($ Id.VSub_At '@'))}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-x>} {(DQ ($ Id.VSub_DollarName mydir) <'/../gcc/xgcc'>)} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'CC='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'CC='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CC='> name:CC) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName mydir) <'/../gcc/xgcc -B'> ($ Id.VSub_DollarName mydir) <'/../gcc/'> ) } ) ] redirects: [] ) ] spids: [474 486] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <find_prog> more_env: [] words: [{<find_prog>} {<gcc>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Cannot find '> ($ Id.VSub_DollarName prog))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [506 517] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'CC='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'CC='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CC='> name:CC) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName prog))} ) ] redirects: [] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <find_prog> more_env: [] words: [{<find_prog>} {<readelf>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <which> more_env: [] words: [{<which>} {<readelf>}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'prog='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prog='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prog='> name:prog) op: assign_op.Equal rhs: {<readelf>} ) ] redirects: [] ) ] spids: [569 584] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Cannot find '> ($ Id.VSub_DollarName prog))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] spids: [555 566] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'READELF='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'READELF='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'READELF='> name:READELF) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName prog))} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.AndOr children: [ (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-h>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <grep> more_env: [] words: [{<grep>} {(SQ <'Class:.*ELF32'>)}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-h>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <grep> more_env: [] words: [{<grep>} {(SQ <'Type:.*EXEC'>)}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-h>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <egrep> more_env: [] words: [{<egrep>} {(SQ <'Machine:.*(SPU|17)'>)}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) ] ops: [<Id.Op_DPipe _> <Id.Op_DPipe _>] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ (${ Id.VSub_Name INFILE) <': Does not appear to be an SPU executable'>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [624 713] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'toe='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'toe='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'toe='> name:toe) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-S>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} {<-n>} {<-e>} { (SQ < 's, *\\[ *\\([0-9]*\\)\\] *\\.toe *[PROGN]*BITS *\\([0-9a-f]*\\).*,\\1 \\2,p' > ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'toe_addr='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'toe_addr='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'toe_addr='> name:toe_addr) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_DollarName toe)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {<-n>} {<-e>} {(SQ <'s,.* ,,p'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'toe='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'toe='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'toe='> name:toe) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_DollarName toe)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {<-n>} {<-e>} {(SQ <'s, .*,,p'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'has_ea='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'has_ea='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'has_ea='> name:has_ea) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-S>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} {<-n>} {<-e>} {(SQ <'s, *\\[ *\\([0-9]*\\)\\] *\\._ea *PROGBITS.*,\\1,p'>)} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'sections='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'sections='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sections='> name:sections) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-S>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} {<-n>} {<-e>} { (SQ < 's, *\\[ *\\([0-9]*\\)\\] *[^ ]* *PROGBITS *\\([0-9a-f]*\\) *\\([0-9a-f]*\\).*,\\1 \\2 \\3,p' > ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'sections='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'sections='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sections='> name:sections) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(${ Id.VSub_Name sections)}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'relas='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'relas='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'relas='> name:relas) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [{(${ Id.VSub_Name READELF)} {<-S>} {(${ Id.VSub_Name INFILE)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} {<-n>} {<-e>} { (SQ < 's, *\\[ *[0-9]*\\] *[^ ]* *RELA *[0-9a-f]* *0*\\([0-9a-f][0-9a-f]*\\).* \\([0-9a-f][0-9a-f]*\\) *[0-9a-f][0-9a-f]*$,\\1 \\2,p' > ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'relas='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'relas='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'relas='> name:relas) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(${ Id.VSub_Name relas)}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name CC)} {(${ Id.VSub_Name FLAGS)} {<-x>} {<assembler-with-cpp>} {<-nostartfiles>} {<-nostdlib>} {<-Wa> <Id.Lit_Comma ','> <-mbig>} {<-Wa> <Id.Lit_Comma ','> <-noexecstack>} {<-Wl> <Id.Lit_Comma ','> <-r>} {<-Wl> <Id.Lit_Comma ','> <-x>} {<-o>} {(${ Id.VSub_Name OUTFILE)} {<->} ] redirects: [ (Redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [ <' .section .data.spetoe,'> <Id.Right_DoubleQuote '"'> <aw> <Id.Right_DoubleQuote '"'> <',@progbits\n'> <' .p2align 7\n'> <'__spetoe__:\n'> (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name READELF)} {<-s>} {<-W>} {(${ Id.VSub_Name INFILE)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <grep> more_env: [] words: [{<grep>} {(SQ <' _EAR_'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sort> more_env: [] words: [{<sort>} {<-k>} {<2>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <awk> more_env: [] words: [ {<awk>} {(SQ <'BEGIN { \\\n'> <'\taddr = strtonum ("0x" "'>) (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name toe_addr> var_name: toe_addr suffix_op: (suffix_op.Unary op: <Id.VTest_ColonHyphen _> arg_word: {<0>} ) right: <Id.Right_DollarBrace '}'> ) (SQ <'"); \\\n'> <'\tsplit ("'>) (DQ (${ Id.VSub_Name sections)) (SQ <'", s, " "); \\\n'> <'\tfor (i = 1; i in s; i += 3) { \\\n'> <'\t sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \\\n'> <'\t} \\\n'> <'} \\\n'> <'$7 == "'> ) (${ Id.VSub_Name toe) (SQ <'" && strtonum ("0x" $2) != addr { \\\n'> < '\tprint "#error Symbol " $8 " not in 16 byte element toe array!"; \\\n' > <'} \\\n'> <'$7 == "'> ) (${ Id.VSub_Name toe) (SQ <'" { \\\n'> <'\taddr = addr + 16; \\\n'> <'} \\\n'> <'$7 == "'>) (${ Id.VSub_Name toe) (SQ <'" { \\\n'> <'\tprint "#ifdef _LP64"; \\\n'> < '\tprint " .quad " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0"; \\\n' > <'\tprint "#else"; \\\n'> < '\tprint " .int 0, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0, 0"; \\\n' > <'\tprint "#endif"; \\\n'> <'} \\\n'> <'$7 != "'> ) (${ Id.VSub_Name toe) (SQ <'" && $7 in sec_off { \\\n'> <'\tprint "#ifdef _LP64"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] ", R_PPC64_ADDR64, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \\\n' > <'\tprint "#else"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] + 4 ", R_PPC_ADDR32, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \\\n' > <'\tprint "#endif"; \\\n'> <'\tif (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \\\n'> <'} \\\n'> <'$7 != "'> ) (${ Id.VSub_Name toe) (SQ <'" && ! $7 in sec_off { \\\n'> <'\tprint "#error Section not found for " $8; \\\n'> <'} \\\n'> ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) <'\n'> (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Name relas))}] redirects: [] do_fork: T ) (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name READELF)} {<-r>} {<-W>} {(${ Id.VSub_Name INFILE)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <awk> more_env: [] words: [ {<awk>} {(SQ <'BEGIN { \\\n'> <'\tsplit ("'>) (DQ (${ Id.VSub_Name sections)) (SQ <'", s, " "); \\\n'> <'\tfor (i = 1; i in s; i += 3) { \\\n'> <'\t sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \\\n'> <'\t} \\\n'> <'\tsplit ("'> ) (DQ (${ Id.VSub_Name relas)) (SQ <'", s, " "); \\\n'> <'\tfor (i = 1; i in s; i += 2) { \\\n'> <'\t rela[s[i]] = strtonum (s[i+1]); \\\n'> <'\t} \\\n'> <'} \\\n'> <'/^Relocation section/ { \\\n'> <'\tsec = substr($6, 3); \\\n'> <'} \\\n'> <'$3 ~ /R_SPU_PPU/ { \\\n'> <'\tprint "#ifdef _LP64"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" substr($3, 10) ", " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \\\n' > <'\tprint "#else"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + (substr($3, 10) == "64" ? 4 : 0)", R_PPC_ADDR32, " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \\\n' > <'\tprint "#endif"; \\\n'> <'\tif (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \\\n'> <'} \\\n'> <'$3 ~ /unrecognized:/ { \\\n'> <'\tprint "#ifdef _LP64"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" ($4 == "f" ? "64" : "32") ", " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \\\n' > <'\tprint "#else"; \\\n'> < '\tprint " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + ($4 == "f" ? 4 : 0)", R_PPC_ADDR32, " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \\\n' > <'\tprint "#endif"; \\\n'> <'\tif (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \\\n'> <'} \\\n'> ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) ] ops: [<Id.Op_DPipe _>] ) right: <Id.Backtick_Right '`'> ) <'\n'> <'#if '> (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name has_ea> var_name: has_ea suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<0>}) right: <Id.Right_DollarBrace '}'> ) <'\n'> <' .section .data.speelf,'> <Id.Right_DoubleQuote '"'> <aw> <Id.Right_DoubleQuote '"'> <',@progbits\n'> <'#elif defined (HAS_RELOCS) && (defined (__PIC__) || defined (__PIE__))\n'> <' .section .data.rel.ro.speelf,'> <Id.Right_DoubleQuote '"'> <a> <Id.Right_DoubleQuote '"'> <',@progbits\n'> <'#else\n'> <' .section .rodata.speelf,'> <Id.Right_DoubleQuote '"'> <a> <Id.Right_DoubleQuote '"'> <',@progbits\n'> <'#endif\n'> <' .p2align 7\n'> <'__speelf__:\n'> <' .incbin '> <Id.Right_DoubleQuote '"'> (${ Id.VSub_Name INFILE) <Id.Right_DoubleQuote '"'> <'\n'> <'\n'> <' .section .data.spehandle,'> <Id.Right_DoubleQuote '"'> <aw> <Id.Right_DoubleQuote '"'> <',@progbits\n'> <' .globl '> (${ Id.VSub_Name SYMBOL) <'\n'> <' .type '> (${ Id.VSub_Name SYMBOL) <', @object\n'> <'# fill in a struct spe_program_handle\n'> <'#ifdef _LP64\n'> <' .p2align 3\n'> (${ Id.VSub_Name SYMBOL) <':\n'> <' .int 24\n'> <' .int 0\n'> <' .quad __speelf__\n'> <' .quad __spetoe__\n'> <'#else\n'> <' .p2align 2\n'> (${ Id.VSub_Name SYMBOL) <':\n'> <' .int 12\n'> <' .int __speelf__\n'> <' .int __spetoe__\n'> <'#endif\n'> <' .size '> (${ Id.VSub_Name SYMBOL) <', . - '> (${ Id.VSub_Name SYMBOL) <'\n'> <'\n'> (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name READELF)} {<-s>} {<-W>} {(${ Id.VSub_Name INFILE)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <grep> more_env: [] words: [{<grep>} {(SQ <' _SPUEAR_'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sort> more_env: [] words: [{<sort>} {<-k>} {<2>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <awk> more_env: [] words: [ {<awk>} {(SQ <'{ \\\n'> <'\tprint " .globl '>) (${ Id.VSub_Name SYMBOL) (SQ <'_" substr($8, 9); \\\n'> <'\tprint " .type '>) (${ Id.VSub_Name SYMBOL) (SQ <'_" substr($8, 9) ", @object"; \\\n'> <'\tprint " .size '>) (${ Id.VSub_Name SYMBOL) (SQ <'_" substr($8, 9) ", 4"; \\\n'> <'\tprint "'>) (${ Id.VSub_Name SYMBOL) (SQ <'_" substr($8, 9) ":"; \\\n'> <'\tprint " .int 0x" $2; \\\n'> <'} \\\n'> ) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) <'\n'> ] ) ) ] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <main> more_env: [] words: [{<main>} {(DQ ($ Id.VSub_At '@'))}] redirects: [] do_fork: T ) ] )