This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add support for ia16

>>> On 03.04.17 at 18:14, <> wrote:
> On 03/04/2017 08:37, Jan Beulich wrote:
>> So how would a consumer of the ELF binary recognize the 16bit-ness?
>> I.e. shouldn't there first be an extension to the i386 ELF ABI to mark
>> either the whole object or (preferred) individual sections as 16bit?
> There probably should. I'll take a look at adding this. Do you know if 
> other architectures have similar extensions that I could look at to see 
> how they do it?

x86-64 has the x32 sub-mode, but that is (bogusly imo) indicated
by using a 32-bit ELF instead of the default 64-bit ELF one. IA-64
uses a bit in e_flags (and it looks like some other architectures,
like MIPS, do too), which is the approach I'd expect to be used
everywhere when mixed bitness in a single executable is not
intended to be permitted. I can't seem to find examples of section
flags indicating bitness - ARM's Thumb mode, for example, works
by inserting special marker labels instead (thus allowing mixed
code inside a section).

>>>> +    targ_selvecs="i386_msdos_vec i386_aout_vec"
>> Why force aout in for everyone?
> It seems to be a prerequisite for i386_msdos_vec - without it, I get 
> "undefined reference to `aout_32_mkobject'" in i386msdos.o.

That seems strange to me, but then again I know next to nothing
about this setting up of target vectors. Generally I'd expect
dependencies to be taken care of without having to list them
explicitly. Nor can I see any reasonable connection between
MS-DOS executables and a.out ones. But anyway ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]