31 May 2016, 21:31 | #21 | ||||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
The whole C src is available if you follow the directions on compiling.
Quote:
Quote:
Quote:
Quote:
_ov_test_callbacks(), _ov_test(), _ov_test_open(), _ov_streams(), _ov_seekable(), _ov_bitrate(), _ov_bitrate_instant(), _ov_serialnumber(), _ov_raw_total(), _ov_pcm_seek_page(), _ov_pcm_seek(), _ov_time_seek(), _ov_time_seek_page(), _ov_raw_tell(), _ov_time_tell(), _ov_comment(), _ogg_page_packets(), _ogg_sync_pageout(), unnamed lab_4130 function, _vorbis_comment_query(), _vorbis_comment_query_count(), _oggpack_bytes(), _oggpack_bits(), _vorbis_lsp_to_curve(), unnamed lab_fbbe function Only remove the code and not the data they refer to as some of these functions have been inlined. GCC leaves the original code for functions it inlines unless they are declared as private. Some of this code is test and debug too. It should be possible to save a few kb here. The way ADis disassembles, it is possible to identify this. Strip the symbols, disassemble and see which functions have no labels at the top. I have made an effort to allow smaller disassemblies which is more important for people with limited memory. Adding multiple data per line would require extra formatting when outputting -a options and more care not to overflow the line buffer. I would rather not add more complexity here but it would be a nice option if it was simple and easy. |
||||
01 June 2016, 08:10 | #22 | |||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Quote:
Quite old indeed. My doc says it got added in version 3.10 (i'm using version 4.44). Quote:
Quote:
Some of this code might be useful later, though. Like giving extra infos about the stream, or seeking. Quote:
- make the multiple data per line mutually exclusive with -a options - output 16 bytes per line (4 longs, 8 words, 16 bytes) For me it's simple and easy. |
|||||
08 June 2016, 23:24 | #23 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Some versions of GCC seem to not use a HUNK_END between hunks when compiled with ixemul. I made the ADis hunk loader code more robust so it works now with more ixemul executables (the original ixemul oggv_dec). I added support for HUNK_UNITs with up to 255 hunks so some .o and .lib files disassemble now (vbcc and SAS/C are best bets while GCC uses some non-Amiga standard). Also, some HUNK_OVERLAY hunks were not found before. The new ADis is attached in the first post of this thread. The changes are significant so let me know if I broke anything.
|
08 June 2016, 23:34 | #24 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Is the new version available on the first post ?
Kamelito |
09 June 2016, 00:17 | #25 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
|
09 June 2016, 10:06 | #26 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
From what i've seen everything is fine. Regardless of the version, apparently it easily misses dead code blocks. However an option to automatically detect as code a block that ends with dc.w $4e75 would fix many of these. During my tests i checked the IRA disassembler and didn't like its output, but it has a nice option to read code addresses from a config file. Shouldn't be difficult : after all they're just extra options (-dc, -dd and perhaps others as well) in a separate file instead of the command line. If you don't know what to do |
|
09 June 2016, 11:08 | #27 | ||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Yes. The AmigaOS is very forgiving about unusual executables. Perhaps it was too lenient as the many different variations make it more difficult to write a hunk parser which handles everything the AmigaOS does. ADis still does not handle all executables but I think it is now more forgiving and in better shape to be further improved if necessary.
Good. The many different variations make testing difficult too. Quote:
Quote:
I began preparing ADis to be able to parse lines from a config file like it does for the command line but it was enough work that I became sidetracked before I finished. It is possible to create an AmigaDOS script which calls ADis with a long command line of options. This allows saving the disassemble config for the file but has a restrictive line length limit. I would like to add support for a config file but it is not a priority. Sorry if I am in more of a bug fix and maintenance mode currently. I have some other projects that need attention too. The source is included if you want to give it a try. |
||
12 June 2016, 15:49 | #28 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
I've found a case where the code isn't followed but could have been.
The output was something like : Code:
jmp 2(pc,d2.w) lab_9946 rts dc.l $4e754e75 dc.l $60166078 dc.b "`BS@7@",0 (etc) |
12 June 2016, 16:15 | #29 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
The reassembler cannot know where the code is, as d2 can have any negative or postive value. Most tables will start with d2=0, but you cannot be sure. And the length is completely unknown.
Usually jump tables have to be marked as such by the user. |
12 June 2016, 19:28 | #30 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Yea, everything phx said. The disassembler does not know the value in d2. The most difficult part would be detecting the end of the table but the start would be a guess too. Supporting many different variations of jump tables is more complex that it first looks (I have had to rework the code several times to make it more flexible and correct). ADis should recognize most compiler generated jump tables but there are too many hand coded assembler jump table variations.
@phx Have you tested the new version of ADis with some vbcc .lib and .o files? I only tested with a few examples and HUNK_LIB is still not supported although I couldn't find any cases where it was used. Last edited by matthey; 12 June 2016 at 21:39. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disassembler | copse | Coders. General | 86 | 01 January 2023 20:34 |
IDA Disassembler | BippyM | Coders. General | 36 | 03 October 2018 10:51 |
ReSource Disassembler | DarrenHD | request.Apps | 3 | 22 June 2014 20:03 |
ReSource disassembler | gizmomelb | request.Apps | 5 | 21 January 2006 23:50 |
Built in disassembler | XDread | request.UAE Wishlist | 4 | 24 April 2004 02:20 |
|
|