e32tools/elf2e32/source/filedump.cpp
changeset 22 f76056b903a8
parent 20 f2446ffbf2b5
child 23 0a67eddbe320
equal deleted inserted replaced
21:cdfb74fd77ed 22:f76056b903a8
   213 			if(aSym->Absent())
   213 			if(aSym->Absent())
   214 			{
   214 			{
   215 				aItr++;
   215 				aItr++;
   216 				continue;
   216 				continue;
   217 			}
   217 			}
   218 
   218 			fputs("\t.common ",fptr);
   219 			fputs("\t.extern ",fptr);
       
   220 			fputs(aSym->SymbolName(),fptr);
   219 			fputs(aSym->SymbolName(),fptr);
   221 			fputs("\n",fptr);
   220 			fputs(" 4\n",fptr);
   222 			aItr++;
   221 			aItr++;
   223 		}
   222 		}
   224 
   223 
   225         // Create a directive section that instructs the linker to make all listed
       
   226         // symbols visible.
       
   227 
       
   228         fputs("\t.text\n\n",fptr);
       
   229 
       
   230         fputs("\t.ascii \"#<SYMEDIT>#\\n\"\n", fptr);
       
   231 
       
   232 		aItr = aSymList->begin();
       
   233 		while (aItr != last)
       
   234 		{
       
   235 			aSym = *aItr;
       
   236 
       
   237 			if ( aSym->Absent() )
       
   238 			{
       
   239 				aItr++;
       
   240 				continue;
       
   241 			}
       
   242 
       
   243             // Example:
       
   244             //  DCB "EXPORT __ARM_ll_mlass\n"
       
   245 			fputs("\t.ascii \"EXPORT ",fptr);
       
   246 			fputs(aSym->SymbolName(),fptr);
       
   247 			fputs("\\n\"\n", fptr);
       
   248 
       
   249 			aItr++;
       
   250 		}
       
   251 		fclose(fptr);
   224 		fclose(fptr);
   252 	}
   225 	}
   253 	return 0;
   226 	return 0;
   254 }
   227 }
   255 
   228