[PATCH PROPOSAL] Bcc: Force initial .text directive

MFLD <[email protected]> Sat, 11 Apr 2015 18:02:28 +0200
Newsgroups org.kernel.vger.linux-8086
Message-ID <[email protected]>
Hello,

Here is a patch proposal to force the insertion of a .text directive at 
the beginning of the bcc-cc1 output file.
This is because Bcc makes the assumption that the as86 assembler starts 
with the code segment.
This patch prevents the compilation to fail if migrating to another 
assembler with a different assumption.

MFLD


diff --git a/bcc/codefrag.c b/bcc/codefrag.c
index d796810..80bab18 100644
--- a/bcc/codefrag.c
+++ b/bcc/codefrag.c
@@ -592,7 +592,8 @@

  typedef fastin_t seg_t;        /* range 0..3 */

-PRIVATE seg_t segment;        /* current seg, depends on init to CSEG = 
0 */
+/* Initialize to -1 to force initial segment directive */
+PRIVATE seg_t segment = -1;        /* current segment */

  /* add carry resulting from char addition */