File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2409,25 +2409,6 @@ fn extracted_path(target_dir: &Utf8NativePath, path: &Utf8UnixPath) -> Utf8Nativ
24092409 target_path
24102410}
24112411
2412- fn string_to_symbol ( string : & CStr ) -> String {
2413- let mut result = String :: with_capacity ( string. count_bytes ( ) ) ;
2414- result. push_str ( "@s_" ) ;
2415-
2416- for chr in string. to_bytes ( ) {
2417- let chr = char:: from ( * chr) ;
2418- if chr. is_ascii_alphanumeric ( ) {
2419- result. push ( chr) ;
2420- } else {
2421- result. push ( '_' ) ;
2422- }
2423- if result. len ( ) > 32 {
2424- break ;
2425- }
2426- }
2427-
2428- result
2429- }
2430-
24312412fn strings ( args : StringsArgs ) -> Result < ( ) > {
24322413 let mut file = open_file ( & args. elf_file , true ) ?;
24332414 let data = file. map ( ) ?;
@@ -2449,10 +2430,9 @@ fn strings(args: StringsArgs) -> Result<()> {
24492430 let size = str. count_bytes ( ) + 1 ;
24502431
24512432 println ! (
2452- "{} = {}:0x{:08X}; // type:object size:0x{:X} scope:local data:string" ,
2453- string_to_symbol( str ) ,
2454- section_name,
2433+ "str_{0:08X} = {1}:0x{0:08X}; // type:object size:0x{2:X} scope:local data:string" ,
24552434 relative as u64 + section. address( ) ,
2435+ section_name,
24562436 size
24572437 ) ;
24582438
You can’t perform that action at this time.
0 commit comments