Commit Graph

17002 Commits

Author SHA1 Message Date
whitequark e5c22bd4f9 Simplify and unbreak libr.a generation.
libr.a is a static library that combines every library r2 builds
and/or depends on, which means that they should be repackaged.

Before this commit, the situation was quite sorry:
  * Makefile-ar.mk was parameterized by ARTYPE;
  * there were three ARTYPEs, default, gnu and ios;
  * the ios ARTYPE was not used and instead its logic was folded
    into default;
  * the gnu ARTYPE was obviously broken (typo in "rm -f libr.",
    typo in "$(C_AR)") preventing it from ever running correctly;
  * the default ARTYPE created libraries that did not link
    on e.g. a Linux desktop, since the libr.a it created consisted
    only of another .a files, and this just results in an error
    trying to link:
      libr.a: error adding symbols: Archive has no index; run ranlib to add one
  * the default ARTYPE, when targeting iOS, performed a bunch of
    useless work combining the archives as above, and then just
    delegated to libtool, which overwrites the result.

After this commit:
  * there is no ARTYPE (nothing in the r2 tree sets it anyway);
  * there are no platform-specific assumptions about ar, such
    as support for the -M option;
  * there is only one code path;
  * every archive is partially linked into a single object file
    and then added to libr.a.
2018-01-11 23:09:22 +01:00
whitequark dcd1ef1c6b Rework makefiles to make ${PARTIALLD} available. 2018-01-11 23:09:22 +01:00
whitequark f552b65ddf Rework makefiles so that ${CROSS} contains cross tool prefix.
Useful for e.g. invoking ${CROSS}ld -r.
While we're at it, make sure ${AR} always points to the cross tool.
2018-01-11 23:09:22 +01:00
emvivre fa942fdc8b Add some operators for x86 assembly (SIDT, SLDT, SMSW). (#9176)
* Add SIDT operator for x86 assembler (Store Interrupt Descriptor Table Register)
* Add SLDT operator for x86 assembler (Store Local Descriptor Table Register)
* Add SMSW operator for x86 assembler (Store Machine Status Word)
2018-01-11 23:07:42 +01:00
Daniel Corak eac9dda866 Implemented JSON output for all fd* commands (#9174) 2018-01-11 22:22:32 +01:00
emvivre fbe2063e0c Add new operators to x86 assembly (SGDT, STMXCSR, STR). (#9171)
* Add SGDT operator for x86 assembler (Store Global Descriptor Table Register)
* Add STMXCSR operator for x86 assembler (Store MXCSR Register State)
* Add STR operator for x86 assembler (Store Task Register)
2018-01-11 21:59:37 +01:00
sivaramaaa 850ee34055 Initial implementation of izzz 2018-01-11 21:59:05 +01:00
pancake f051479472 Add RASM2_ARCH and RASM2_BITS in rasm2 -h 2018-01-11 21:48:41 +01:00
Paul I 2b0c9d1a17 Refactored meson scripts (#9143) 2018-01-11 20:20:23 +04:00
Giovanni f32cc2777a added ppc Paired single (#9172) 2018-01-11 14:07:30 +01:00
Lowly Worm 24833a5294 z64 is only for big endian, the magic was f'd up
needs to be extended to handle .n64 little endian formats
2018-01-10 23:37:05 -08:00
pancake da8badf3cc Where in time is r_io_open_buffer? 2018-01-11 01:03:45 +01:00
xarkes e28518f478 Added missing z64 declaration 2018-01-10 23:20:18 +01:00
pancake e5235f7d97 Fix last covs, radiff crash and tweak the z64 bin plugin 2018-01-10 19:18:36 +01:00
pancake b27326e891 Kill RCoreFile from rabin2 2018-01-10 13:53:53 +01:00
pancake 52d93207af Initial de-rcorefile-fication 2018-01-10 13:45:37 +01:00
rene fbee0b46b4 Fixes the zign tests, added anal.pltujmp var to config 2018-01-10 13:00:21 +01:00
pancake 9da487344f Fix oob in cmd_open test 2018-01-10 12:29:15 +01:00
pancake f15618a706 Fix versioninfo for ELF, still more to change to use Sdb optimally 2018-01-10 12:08:56 +01:00
pancake a706fecbd9 Fix radiff2 -B patch 2018-01-10 10:18:31 +01:00
Lowly Worm 1950ed37a5 fixup style for variable decl 2018-01-09 23:25:57 -08:00
Lowly Worm 287e93b9cb comment out some wip code, fix scoping for undo 2018-01-09 23:22:45 -08:00
pancake bdbc2c5851 More cleanup and ritvization 2018-01-10 07:43:54 +01:00
Lowly Worm 55255e225a fix segfault in anal 2018-01-09 18:30:13 -08:00
Lowly Worm 76ea290f09 fix the build from b926122772 2018-01-09 18:18:44 -08:00
pancake b926122772 Use RInterval in io.cache and io.pcache, renaming and code cleanup 2018-01-10 02:35:11 +01:00
Lowly Worm 7da0d9f301 flags on mach0 are fucky 2018-01-09 17:33:25 -05:00
Andrea Sindoni f546e0751b Fix SIGSEGV in the encoder execution (#9168) 2018-01-09 22:04:25 +01:00
Francesco Tamagni 8f6d84c6a2
Update canal.c
Add missing `;`
2018-01-09 21:29:31 +01:00
Rene Laemmert 0df2adbe09 First step in removing fcn->refs/xrefs (#9157) 2018-01-09 20:38:08 +01:00
emvivre a3f7ce2336 Add several operators for x86 assembly (LLDT, LMSW, LGDT/LIDT) (#9165)
* Add LLDT operator for x86 assembler (Load Local Descriptor Table Register)

* Add LMSW operator for x86 assembler (Load Machine Status Word)

* Add LGDT/LIDT operator for x86 assembler (Load Global/Interrupt Descriptor Table Register)
2018-01-09 20:17:28 +01:00
Ren Kimura 358a8823b1 Add notice message for NSO binary loading (#9164) 2018-01-09 20:06:15 +01:00
Paul I e2bb54b41d Update meson.build (#9163) 2018-01-09 18:50:40 +01:00
Giovanni eb5200743e Removed debug eprintf from gdb code 2018-01-09 18:40:22 +01:00
pancake 5f55965f77 Update capstone and adjust invalid patch 2018-01-09 18:37:50 +01:00
Khairul Kasmiran 5402c5938d Fixed cases where hash+space in quoted string is treated as comment 2018-01-09 23:11:38 +08:00
pancake 5a6599e2e8 Minor syntax fixes for libr/io 2018-01-09 16:05:50 +01:00
Khairul Kasmiran b2d2cb25f7 Fixed hang when there are multiple '>' in cmd line 2018-01-09 21:32:36 +08:00
emvivre 3d6584f934 Add several float operators for x64 assembly (FSTCW/FNSTCW, FSTSW/FNSTSW, FSAVE/FNSAVE) (#9154)
* Add FSTCW/FNSTCW operator for x86 assembler (Store x87 FPU Control Word)

* Add FSTSW/FNSTSW operator for x86 assembler (Store x87 FPU Status Word)

* Fix some issues of float instructions for x86 assembler.

* Add FSAVE/FNSAVE operator for x86 assembler (Store x87 FPU State)
2018-01-09 10:38:54 +01:00
Lowly Worm 607cfc1649 revert the # handling that was breaking some parsing 2018-01-08 22:05:21 -08:00
Lowly Worm f306a3ae0b segments dont use the S_ZEROFILL, just section 2018-01-08 20:50:55 -08:00
Lowly Worm 3d8833f47c handle S_ZEROFILL sections as sz=0 on mach0
- bss is S_ZEROFILL, it's zero size on disk, but it's zerofilled to fill
the full vsz, so vsz = the size, and sz = 0
2018-01-08 20:45:02 -08:00
Lowly Worm dde733e799 add the correct magic for z64 2018-01-08 18:48:01 -08:00
Lowly Worm f87b526ea5 disable n64 until the load issue can be worked out 2018-01-08 09:58:09 -08:00
pancake 4427537998 Fix #9144 - Honor RBinInfo.cpu in i,i*,ij... 2018-01-08 15:11:47 +01:00
pancake 06311f718b Fix #9126 - Bring back the good old LEA syntax 2018-01-08 14:17:52 +01:00
pancake 4541670e60 Fix build on C-compliant compilers (for(int) issue) 2018-01-08 13:01:30 +01:00
pancake 6437e0049b Add sys/subst.sh shellscript helper 2018-01-08 11:25:46 +01:00
pancake 6b00784cb1 Add more priviledged arm64 instruction types and opcode descriptions 2018-01-08 11:21:48 +01:00
pancake 6379d18894 Fix #8526 - Implement obq and ob* 2018-01-08 10:28:32 +01:00