From: MFLD <mfld.fr@gmail.com>
To: ELKS <Linux-8086@Vger.Kernel.Org>
Subject: Re: Question on import symbols generated by BCC
Date: Wed, 08 Apr 2015 18:41:29 +0200 [thread overview]
Message-ID: <55255A39.7060503@gmail.com> (raw)
In-Reply-To: <551599A4.7060804@gmail.com>
Hello,
No reply to this one... should I submit that case to another mailing list ?
Regards,
MFLD
On 27/03/2015 18:55, MFLD wrote :
> Hello,
>>
>> While compiling a boot code for my embedded device that will load
>> ELKS from the Flash, I get some trouble while linking several object
>> files together, some of them are .S compiled with AS86, others are .C
>> compiled with BCC. Let me explain with a unit test to insulate the
>> problem:
>>
>> Here is the first source file "test1.s":
>>
>> .extern _main
>> .define _entry
>> .text
>> _entry: br _main
>> end
>>
>> Here is the second souce file "test2.c":
>>
>> extern void entry ();
>> void main () { entry (); }
>>
>> These simple sources make 2 cross references with 2 exports and 2
>> imports in each object files.
>>
>> Here is the object file generated by "as86 -o test1.o test1.s"
>> (objdump86 test1.o):
>>
>> OBJECTFILE 'test1.o'
>> MODULE 'test1'
>> BYTEPOS 00000038
>> BINLEN 00000003
>> STRINGS 0025 +0013
>> VERSION 0.0
>> SEG0 00000003
>>
>> SYMS 2
>> SYM 0 00000000 ...IT _main
>> SYM 1 00000000 ..E.T _entry
>>
>> text data bss dec hex filename
>> 3 0 0 3 3 test1.o
>>
>> BYTECODE
>> SEG 0
>> : e9 .
>> RELSZ 2
>> DW _main-PC
>>
>> In the symbol table, we can see both the public import & text, and
>> the public export & text. That looks correct.
>>
>> Now here is the object file generated by "bcc -ansi -c -o test2.o
>> test2.c" (objdump86 test2.o):
>>
>> OBJECTFILE 'test2.o'
>> MODULE 'test2'
>> BYTEPOS 00000038
>> BINLEN 0000000c
>> STRINGS 0025 +0013
>> VERSION 0.0
>> SEG0 0000000c
>>
>> SYMS 2
>> SYM 0 00000000 ..E.T _main
>> SYM 1 00000000 ...IU _entry
>>
>> text data bss dec hex filename
>> 12 0 0 12 c test2.o
>>
>> BYTECODE
>> SEG 0
>> : 55 89 e5 57 56 e8 U..WV.
>> RELSZ 2
>> DW _entry-PC
>> : 5e 5f 5d c3 ^_].
>> SEG 3
>>
>> This time, in the symbol table, the public & import symbol _entry has
>> the 'U' flag, not the 'T' as expected.
>>
>> Should not it be flagged 'T' instead ?
>>
>> Thanks for your support,
>>
>> MFLD
>>
>> PS : the "boot code" I am writting is a kind of "coreboot" for 8086,
>> could I name it "boot86" :-) ?
next prev parent reply other threads:[~2015-04-08 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <551595A4.7040206@gmail.com>
2015-03-27 17:55 ` Question on import symbols generated by BCC MFLD
2015-04-08 16:41 ` MFLD [this message]
2015-04-08 16:45 ` Jody Bruchon
2015-04-09 8:31 ` Marc-François LUCCA-DANIAU
2015-04-09 10:43 ` Jody Bruchon
[not found] <55294997.3090501@gmail.com>
2015-04-11 19:42 ` MFLD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55255A39.7060503@gmail.com \
--to=mfld.fr@gmail.com \
--cc=Linux-8086@Vger.Kernel.Org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.