File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
hardware/memory/cartridge/elf Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -694,15 +694,7 @@ func (mem *elfMemory) runInitialisation(arm *arm.ARM) error {
694694 // the elf.File structure is no good for our purposes
695695 for _ , s := range mem .symbols {
696696 if s .Name == "main" || s .Name == "elf_main" {
697- // ".text.main" is emitted by the rust compiler, while ".text" is emitted by GCC
698- // there must be a more robust way of finding the principal section
699- sec , ok := mem .sectionsByName [".text.main" ]
700- if ! ok {
701- sec , ok = mem .sectionsByName [".text" ]
702- if ! ok {
703- return fmt .Errorf ("ELF: could not find .text section" )
704- }
705- }
697+ sec := mem .sections [s .Section ]
706698 mem .resetPC = sec .origin + uint32 (s .Value )
707699 mem .resetPC &= 0xfffffffe
708700 break // for loop
You can’t perform that action at this time.
0 commit comments