Richard Heathfield
10/20/2014 10:10:00 PM
Bill Cunningham wrote:
>
> "Richard Heathfield" <invalid@see.sig.invalid> wrote in message
> news:zge1w.538878$NQ4.299324@fx26.am4...
>> Bill Cunningham wrote:
>>
>>> Now is a flat binary only data or does it contain any code? I know
>>> the
>>> sections are stripped away.
>>
>> The distinction between code and data is arbitrary. A program that zips
>> up executables treats code as data. An interpreter treats data as code.
>>
>> Here's a binary (nybbled into hexadecimal for ease of reading).
>>
>> 74 4A 24 89 05 32 8C 66 CA 1D EA 01 EA 39 1D 4F
>> 57 2B B8 29 21 CD 27 2B B5 CA A3 08 64 68 99 F3
>> 92 C2 53 7E 20 B3 3D E7 C6 38 B3 2A 55 42 32 86
>> 66 07 81 61 A1 F5 A9 A4 AF F9 53 D4 5C 77 EA CD
>>
>> Is that code or data?
>>
>> The only meaningful answer is "yes".
>
> What if your first two bytes, 74 4A was a format descriptor. Would that be
> considered "code"?
You seem to have missed my point. It's just bits. That's all. Bits have no
intrinsic meaning. They mean what a programmer wants them to mean. If they
are treated as code, they are code. They might be bad code or they might be
good code, but they're code. If they are treated as data, they are data.
They might be ill-formed data or well-formed data, but they're data.
Dataness or codinosity is in the eye of the program that reads the bits.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within