* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
@ 2011-03-08 10:44 Sedat Dilek
2011-03-08 12:44 ` Sedat Dilek
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-03-08 10:44 UTC (permalink / raw)
To: Stephen Rothwell, Matthias Klose
Cc: linux-next, debian-gcc, binutils, psomas, JBeulich, Ingo Molnar,
H. Peter Anvin, LKML
Hi,
my build of linux-next (next-20110308, the same with the one from
yesterday) is broken.
(I translated the German output.)
[ build.log ]
AS arch/x86/kernel/entry_32.o
/home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
Assembler messages:
/home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
Error: .size expression does not evaluate to a constant
make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
make[4]: *** [arch/x86] Fehler 2 (Error 2)
make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
unfinished jobs...)
I am not sure if this is a problem of Debian's binutils snapshot from
binutils-2_21-branch (Debian-version: 2.21.0.20110302-1) from sid/i386
or this is only a problem for x86, but I just want to let you know.
FYI: The previous binutils (2.21.0.20110216-2) works fine.
I have tried with reverting the last two changes to
arch/x86/kernel/entry_32.S in linux-next:
"x86: Use {push,pop}_cfi in more places" (see [1])
"x86, asm: Cleanup unnecssary macros in asm-offsets.c" (see [2])
Reverting both or [1] or [2] breaks with Debians as (2.21.0.20110302-1).
BTW, [3] has a complete GIT history for the above file.
So, I am unsure from where the problem exactly aroses.
If this a known issue (and a fix around) or rings a bell to you, let
me and others know.
Thanks in advance.
Regards,
- Sedat -
[1] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=60cf637a13932a4750da6746efd0199e8a4c341b
[2] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=7bf04be8f48ceeeffa5b5a79734d6d6e0d59e5f8
[3] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=arch/x86/kernel/entry_32.S;h=2878821cb8c1da1d7147b26271114fa9546afe03;hb=HEAD
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
2011-03-08 10:44 linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?) Sedat Dilek
@ 2011-03-08 12:44 ` Sedat Dilek
2011-03-08 14:55 ` H.J. Lu
2011-03-09 11:54 ` Sedat Dilek
2 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-03-08 12:44 UTC (permalink / raw)
To: Stephen Rothwell, Matthias Klose
Cc: linux-next, debian-gcc, binutils, psomas, JBeulich, Ingo Molnar,
H. Peter Anvin, LKML
[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]
On 3/8/11, Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> Hi,
>
> my build of linux-next (next-20110308, the same with the one from
> yesterday) is broken.
> (I translated the German output.)
>
> [ build.log ]
> AS arch/x86/kernel/entry_32.o
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
> Assembler messages:
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
> Error: .size expression does not evaluate to a constant
> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
> make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
> make[4]: *** [arch/x86] Fehler 2 (Error 2)
> make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
> unfinished jobs...)
>
> I am not sure if this is a problem of Debian's binutils snapshot from
> binutils-2_21-branch (Debian-version: 2.21.0.20110302-1) from sid/i386
> or this is only a problem for x86, but I just want to let you know.
>
> FYI: The previous binutils (2.21.0.20110216-2) works fine.
>
> I have tried with reverting the last two changes to
> arch/x86/kernel/entry_32.S in linux-next:
>
> "x86: Use {push,pop}_cfi in more places" (see [1])
> "x86, asm: Cleanup unnecssary macros in asm-offsets.c" (see [2])
>
> Reverting both or [1] or [2] breaks with Debians as (2.21.0.20110302-1).
>
> BTW, [3] has a complete GIT history for the above file.
>
> So, I am unsure from where the problem exactly aroses.
> If this a known issue (and a fix around) or rings a bell to you, let
> me and others know.
>
> Thanks in advance.
>
> Regards,
> - Sedat -
>
> [1]
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=60cf637a13932a4750da6746efd0199e8a4c341b
>
> [2]
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=7bf04be8f48ceeeffa5b5a79734d6d6e0d59e5f8
>
> [3]
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=arch/x86/kernel/entry_32.S;h=2878821cb8c1da1d7147b26271114fa9546afe03;hb=HEAD
>
I just jumped on binutils-2_21-branch GIT and looked what changed in
gas/ directory.
So there were two patches to consider in the time 2011-03-02 and
2011-02-16 (chronological order, latest listed as first):
[1] commit a57ef8e7f3b214e0cf9ee33bb17c11f9f63bf6aa
"* symbols.c (report_op_error): Remove unnecessary forward declaration."
[2] commit 345bbf7731af2912390e72b86807eb1b2af3e27b
"PR gas/12519"
Reverting [1] still breaks build.
With reverting [1] and [2] I had success.
(Unfortunately, both patches have made changes to gas/ChangeLog, so
for isolating only [2] I had no fun and time).
As a conclusion:
It looks like the "PR gas/12519" patch breaks the linux-next kernel
(or l-n needs some modifications?).
It's up to the experts.
Hope this helps to fix the problem.
- Sedat -
P.S.: I have added both revert-patches.
[1] http://sourceware.org/git/?p=binutils.git;a=commit;h=a57ef8e7f3b214e0cf9ee33bb17c11f9f63bf6aa
[2] http://sourceware.org/git/?p=binutils.git;a=commit;h=345bbf7731af2912390e72b86807eb1b2af3e27b
[-- Attachment #2: 0001-Revert-symbols.c-report_op_error-Remove-unnecessary-.patch --]
[-- Type: text/x-patch, Size: 7107 bytes --]
From a961491daceb17d4d060e1a51025b1eb9e2e32cf Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 8 Mar 2011 11:54:39 +0100
Subject: [PATCH 1/2] Revert " * symbols.c (report_op_error): Remove unnecessary forward declaration."
This reverts commit a57ef8e7f3b214e0cf9ee33bb17c11f9f63bf6aa.
---
gas/ChangeLog | 8 -----
gas/symbols.c | 99 ++++++++++++++++++++++++++-------------------------------
2 files changed, 45 insertions(+), 62 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 488d7b4..caa9b1e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,11 +1,3 @@
-2011-02-28 Alan Modra <amodra@gmail.com>
-
- * symbols.c (report_op_error): Remove unnecessary forward declaration.
- Add "op" parameter. Report operator and operand segments in error
- message, not operand symbols.
- (resolve_symbol_value): Always set segment for equated symbols, not
- just when finalizing. Adjust report_op_error calls.
-
2011-02-25 Alan Modra <amodra@gmail.com>
PR gas/12519
diff --git a/gas/symbols.c b/gas/symbols.c
index 91d0cdb..9a4e2be 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1,7 +1,7 @@
/* symbols.c -symbol table-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -72,6 +72,7 @@ static long dollar_label_instance (long);
static long fb_label_instance (long);
static void print_binary (FILE *, const char *, expressionS *);
+static void report_op_error (symbolS *, symbolS *, symbolS *);
/* Return a pointer to a new symbol. Die if we can't make a new
symbol. Fill in the symbol's values. Add symbol to end of symbol
@@ -969,65 +970,55 @@ use_complex_relocs_for (symbolS * symp)
#endif
static void
-report_op_error (symbolS *symp, symbolS *left, operatorT op, symbolS *right)
+report_op_error (symbolS *symp, symbolS *left, symbolS *right)
{
char *file;
unsigned int line;
- segT seg_left = left ? S_GET_SEGMENT (left) : 0;
- segT seg_right = S_GET_SEGMENT (right);
- const char *opname;
-
- switch (op)
- {
- default:
- abort ();
- return;
-
- case O_uminus: opname = "-"; break;
- case O_bit_not: opname = "~"; break;
- case O_logical_not: opname = "!"; break;
- case O_multiply: opname = "*"; break;
- case O_divide: opname = "/"; break;
- case O_modulus: opname = "%"; break;
- case O_left_shift: opname = "<<"; break;
- case O_right_shift: opname = ">>"; break;
- case O_bit_inclusive_or: opname = "|"; break;
- case O_bit_or_not: opname = "|~"; break;
- case O_bit_exclusive_or: opname = "^"; break;
- case O_bit_and: opname = "&"; break;
- case O_add: opname = "+"; break;
- case O_subtract: opname = "-"; break;
- case O_eq: opname = "=="; break;
- case O_ne: opname = "!="; break;
- case O_lt: opname = "<"; break;
- case O_le: opname = "<="; break;
- case O_ge: opname = ">="; break;
- case O_gt: opname = ">"; break;
- case O_logical_and: opname = "&&"; break;
- case O_logical_or: opname = "||"; break;
- }
+ segT seg_left = S_GET_SEGMENT (left);
+ segT seg_right = right ? S_GET_SEGMENT (right) : 0;
if (expr_symbol_where (symp, &file, &line))
{
- if (left)
+ if (seg_left == undefined_section)
as_bad_where (file, line,
- _("invalid operands (%s and %s sections) for `%s'"),
- seg_left->name, seg_right->name, opname);
- else
+ _("undefined symbol `%s' in operation"),
+ S_GET_NAME (left));
+ if (seg_right == undefined_section)
as_bad_where (file, line,
- _("invalid operand (%s section) for `%s'"),
- seg_right->name, opname);
+ _("undefined symbol `%s' in operation"),
+ S_GET_NAME (right));
+ if (seg_left != undefined_section
+ && seg_right != undefined_section)
+ {
+ if (right)
+ as_bad_where (file, line,
+ _("invalid sections for operation on `%s' and `%s'"),
+ S_GET_NAME (left), S_GET_NAME (right));
+ else
+ as_bad_where (file, line,
+ _("invalid section for operation on `%s'"),
+ S_GET_NAME (left));
+ }
+
}
else
{
- const char *sname = S_GET_NAME (symp);
-
- if (left)
- as_bad (_("invalid operands (%s and %s sections) for `%s' when setting `%s'"),
- seg_left->name, seg_right->name, opname, sname);
- else
- as_bad (_("invalid operand (%s section) for `%s' when setting `%s'"),
- seg_right->name, opname, sname);
+ if (seg_left == undefined_section)
+ as_bad (_("undefined symbol `%s' in operation setting `%s'"),
+ S_GET_NAME (left), S_GET_NAME (symp));
+ if (seg_right == undefined_section)
+ as_bad (_("undefined symbol `%s' in operation setting `%s'"),
+ S_GET_NAME (right), S_GET_NAME (symp));
+ if (seg_left != undefined_section
+ && seg_right != undefined_section)
+ {
+ if (right)
+ as_bad (_("invalid sections for operation on `%s' and `%s' setting `%s'"),
+ S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
+ else
+ as_bad (_("invalid section for operation on `%s' setting `%s'"),
+ S_GET_NAME (left), S_GET_NAME (symp));
+ }
}
}
@@ -1220,8 +1211,8 @@ resolve_symbol_value (symbolS *symp)
symp->sy_value.X_add_number = final_val;
/* Use X_op_symbol as a flag. */
symp->sy_value.X_op_symbol = add_symbol;
+ final_seg = seg_left;
}
- final_seg = seg_left;
final_val = 0;
resolved = symbol_resolved_p (add_symbol);
symp->sy_resolving = 0;
@@ -1270,7 +1261,7 @@ resolve_symbol_value (symbolS *symp)
~S -> S ^ ~0 only permitted on absolute */
if (op != O_logical_not && seg_left != absolute_section
&& finalize_syms)
- report_op_error (symp, NULL, op, add_symbol);
+ report_op_error (symp, add_symbol, NULL);
if (final_seg == expr_section || final_seg == undefined_section)
final_seg = absolute_section;
@@ -1347,7 +1338,7 @@ resolve_symbol_value (symbolS *symp)
probably need to be changed for an object file format which
supports arbitrary expressions, such as IEEE-695. */
if (!(seg_left == absolute_section
- && seg_right == absolute_section)
+ && seg_right == absolute_section)
&& !(op == O_eq || op == O_ne)
&& !((op == O_subtract
|| op == O_lt || op == O_le || op == O_ge || op == O_gt)
@@ -1358,7 +1349,7 @@ resolve_symbol_value (symbolS *symp)
/* Don't emit messages unless we're finalizing the symbol value,
otherwise we may get the same message multiple times. */
if (finalize_syms)
- report_op_error (symp, add_symbol, op, op_symbol);
+ report_op_error (symp, add_symbol, op_symbol);
/* However do not move the symbol into the absolute section
if it cannot currently be resolved - this would confuse
other parts of the assembler into believing that the
--
1.7.4.1
[-- Attachment #3: 0002-Revert-PR-gas-12519.patch --]
[-- Type: text/x-patch, Size: 3305 bytes --]
From c51488569df7489374b5c6b2825f187186af5f8b Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 8 Mar 2011 12:38:41 +0100
Subject: [PATCH 2/2] Revert " PR gas/12519"
This reverts commit 345bbf7731af2912390e72b86807eb1b2af3e27b.
---
gas/ChangeLog | 5 -----
gas/config/obj-elf.c | 24 ++++++++++++++++++------
ld/testsuite/ChangeLog | 5 -----
ld/testsuite/ld-mn10300/i135409-3.s | 2 +-
ld/testsuite/ld-sh/sh64/stolib.s | 2 +-
5 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index caa9b1e..78dc2d7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,8 +1,3 @@
-2011-02-25 Alan Modra <amodra@gmail.com>
-
- PR gas/12519
- * config/obj-elf.c (elf_frob_symbol): Properly handle size expression.
-
2011-02-01 Alan Modra <amodra@gmail.com>
Backport from mainline
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 969a509..c6dc8d6 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1,6 +1,6 @@
/* ELF object file format
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1889,11 +1889,23 @@ elf_frob_symbol (symbolS *symp, int *puntp)
if (sy_obj->size != NULL)
{
- if (resolve_expression (sy_obj->size)
- && sy_obj->size->X_op == O_constant)
- S_SET_SIZE (symp, sy_obj->size->X_add_number);
- else
- as_bad (_(".size expression does not evaluate to a constant"));
+ switch (sy_obj->size->X_op)
+ {
+ case O_subtract:
+ S_SET_SIZE (symp,
+ (S_GET_VALUE (sy_obj->size->X_add_symbol)
+ + sy_obj->size->X_add_number
+ - S_GET_VALUE (sy_obj->size->X_op_symbol)));
+ break;
+ case O_constant:
+ S_SET_SIZE (symp,
+ (S_GET_VALUE (sy_obj->size->X_add_symbol)
+ + sy_obj->size->X_add_number));
+ break;
+ default:
+ as_bad (_(".size expression too complicated to fix up"));
+ break;
+ }
free (sy_obj->size);
sy_obj->size = NULL;
}
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1b8f84e..56a7a11 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,8 +1,3 @@
-2011-02-25 Alan Modra <amodra@gmail.com>
-
- * ld-mn10300/i135409-3.s: Correct .size label reference.
- * ld-sh/sh64/stolib.s: Likewise.
-
2011-02-10 Alan Modra <amodra@gmail.com>
* ld-gc/start.d: Exclude frv-*-linux*.
diff --git a/ld/testsuite/ld-mn10300/i135409-3.s b/ld/testsuite/ld-mn10300/i135409-3.s
index 8113b78..e83ad96 100644
--- a/ld/testsuite/ld-mn10300/i135409-3.s
+++ b/ld/testsuite/ld-mn10300/i135409-3.s
@@ -10,7 +10,7 @@ A:
BOTTOM:
.balign 0x8
add D0,D1
- .size _func, .-_func
+ .size _func, .-func
.data
L001:
diff --git a/ld/testsuite/ld-sh/sh64/stolib.s b/ld/testsuite/ld-sh/sh64/stolib.s
index a5dee2b..587faa6 100644
--- a/ld/testsuite/ld-sh/sh64/stolib.s
+++ b/ld/testsuite/ld-sh/sh64/stolib.s
@@ -4,4 +4,4 @@
bar:
ptabs r18, tr0
blink tr0, r63
-.Lfe_bar: .size bar,.Lfe_bar-bar
+ .Lfe_bar: .size bar,.Lfe_bar-X
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
2011-03-08 10:44 linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?) Sedat Dilek
2011-03-08 12:44 ` Sedat Dilek
@ 2011-03-08 14:55 ` H.J. Lu
2011-03-08 15:28 ` Sedat Dilek
2011-03-09 11:54 ` Sedat Dilek
2 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2011-03-08 14:55 UTC (permalink / raw)
To: sedat.dilek
Cc: Sedat Dilek, Stephen Rothwell, Matthias Klose, linux-next,
debian-gcc, binutils, psomas, JBeulich, Ingo Molnar,
H. Peter Anvin, LKML
On Tue, Mar 8, 2011 at 2:44 AM, Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> Hi,
>
> my build of linux-next (next-20110308, the same with the one from
> yesterday) is broken.
> (I translated the German output.)
>
> [ build.log ]
> AS arch/x86/kernel/entry_32.o
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
> Assembler messages:
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
> Error: .size expression does not evaluate to a constant
> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
> make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
> make[4]: *** [arch/x86] Fehler 2 (Error 2)
> make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
> unfinished jobs...)
>
This is a kernel bug. Please use the latest binutils from CVS.
It will tell you which symbol causes this.
--
H.J.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
2011-03-08 14:55 ` H.J. Lu
@ 2011-03-08 15:28 ` Sedat Dilek
2011-03-08 15:42 ` Sedat Dilek
0 siblings, 1 reply; 6+ messages in thread
From: Sedat Dilek @ 2011-03-08 15:28 UTC (permalink / raw)
To: H.J. Lu
Cc: Stephen Rothwell, Matthias Klose, linux-next, debian-gcc,
binutils, psomas, JBeulich, Ingo Molnar, H. Peter Anvin, LKML
On 3/8/11, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Mar 8, 2011 at 2:44 AM, Sedat Dilek <sedat.dilek@googlemail.com>
> wrote:
>> Hi,
>>
>> my build of linux-next (next-20110308, the same with the one from
>> yesterday) is broken.
>> (I translated the German output.)
>>
>> [ build.log ]
>> AS arch/x86/kernel/entry_32.o
>> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
>> Assembler messages:
>> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
>> Error: .size expression does not evaluate to a constant
>> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
>> make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
>> make[4]: *** [arch/x86] Fehler 2 (Error 2)
>> make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
>> unfinished jobs...)
>>
>
> This is a kernel bug. Please use the latest binutils from CVS.
> It will tell you which symbol causes this.
>
>
> --
> H.J.
>
Yeah, I have cherry-picked these two upstream commits before you have
mentionned it...
0001-Mention-symbol-name-in-non-constant-.size-expression.patch
(Cherry-picked from commit b9521fc0be7945fc842ce1197e241a023378125d)
0002-Revert-the-last-change-on-gas-elf-bad-size.err.patch
(Cherry-picked from commit cbd141bb69f791de7ea1581abe7afb34f0c61288)
... and have built with them a new binutils Debian package.
The error looks now like this (sorry for the German output):
...
AS arch/x86/kernel/entry_32.o
/home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
Assembler messages:
/home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
Error: .size expression with symbol `apf_page_fault' does not evaluate
to a constant
make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1
make[5]: *** [arch/x86/kernel] Fehler 2
make[5]: *** Warte auf noch nicht beendete Prozesse...
Anyway, before more riddling around it would be very helpful to have a
clear pointer if there is a fix around... That building, testing and
installing took me now several hours.
And... yeah, backports to 2.21-branch appreciated.
- Sedat -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
2011-03-08 15:28 ` Sedat Dilek
@ 2011-03-08 15:42 ` Sedat Dilek
0 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-03-08 15:42 UTC (permalink / raw)
To: H.J. Lu
Cc: Stephen Rothwell, Matthias Klose, linux-next, debian-gcc,
binutils, psomas, JBeulich, Ingo Molnar, H. Peter Anvin, LKML
[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]
On 3/8/11, Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> On 3/8/11, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Mar 8, 2011 at 2:44 AM, Sedat Dilek <sedat.dilek@googlemail.com>
>> wrote:
>>> Hi,
>>>
>>> my build of linux-next (next-20110308, the same with the one from
>>> yesterday) is broken.
>>> (I translated the German output.)
>>>
>>> [ build.log ]
>>> AS arch/x86/kernel/entry_32.o
>>> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
>>> Assembler messages:
>>> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
>>> Error: .size expression does not evaluate to a constant
>>> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
>>> make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
>>> make[4]: *** [arch/x86] Fehler 2 (Error 2)
>>> make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
>>> unfinished jobs...)
>>>
>>
>> This is a kernel bug. Please use the latest binutils from CVS.
>> It will tell you which symbol causes this.
>>
>>
>> --
>> H.J.
>>
>
> Yeah, I have cherry-picked these two upstream commits before you have
> mentionned it...
>
> 0001-Mention-symbol-name-in-non-constant-.size-expression.patch
> (Cherry-picked from commit b9521fc0be7945fc842ce1197e241a023378125d)
> 0002-Revert-the-last-change-on-gas-elf-bad-size.err.patch
> (Cherry-picked from commit cbd141bb69f791de7ea1581abe7afb34f0c61288)
>
> ... and have built with them a new binutils Debian package.
>
> The error looks now like this (sorry for the German output):
> ...
> AS arch/x86/kernel/entry_32.o
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
> Assembler messages:
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
> Error: .size expression with symbol `apf_page_fault' does not evaluate
> to a constant
> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1
> make[5]: *** [arch/x86/kernel] Fehler 2
> make[5]: *** Warte auf noch nicht beendete Prozesse...
>
> Anyway, before more riddling around it would be very helpful to have a
> clear pointer if there is a fix around... That building, testing and
> installing took me now several hours.
> And... yeah, backports to 2.21-branch appreciated.
>
> - Sedat -
>
After a quick look into the source, it seems attached patch fixes the issue.
Is that OK?
- Sedat -
[-- Attachment #2: 0001-x86-Fix-build-failure-with-binutils-as-from-upstream.patch --]
[-- Type: text/x-patch, Size: 940 bytes --]
From c4f8070805fff7c0d097b7a0fb4f549ebd14a74b Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 8 Mar 2011 16:32:18 +0100
Subject: [PATCH] x86: Fix build failure with binutils/as from upstream
This is from my build log:
[...]
AS arch/x86/kernel/entry_32.o
arch/x86/kernel/entry_32.S: Assembler messages:
arch/x86/kernel/entry_32.S:1421: Error: .size expression with symbol `apf_page_fault' does not evaluate to a constant
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
arch/x86/kernel/entry_32.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index c8b4efa..9ca3b0e 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1413,7 +1413,7 @@ ENTRY(async_page_fault)
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
-END(apf_page_fault)
+END(async_page_fault)
#endif
/*
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?)
2011-03-08 10:44 linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?) Sedat Dilek
2011-03-08 12:44 ` Sedat Dilek
2011-03-08 14:55 ` H.J. Lu
@ 2011-03-09 11:54 ` Sedat Dilek
2 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-03-09 11:54 UTC (permalink / raw)
To: Stephen Rothwell, Matthias Klose
Cc: linux-next, debian-gcc, binutils, amodra, H.J. Lu
[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]
On Tue, Mar 8, 2011 at 11:44 AM, Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> Hi,
>
> my build of linux-next (next-20110308, the same with the one from
> yesterday) is broken.
> (I translated the German output.)
>
> [ build.log ]
> AS arch/x86/kernel/entry_32.o
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:
> Assembler messages:
> /home/sd/src/linux-2.6/linux-2.6.38-rc7/debian/build/source_i386_none/arch/x86/kernel/entry_32.S:1421:
> Error: .size expression does not evaluate to a constant
> make[6]: *** [arch/x86/kernel/entry_32.o] Fehler 1 (Error 1)
> make[5]: *** [arch/x86/kernel] Fehler 2 (Error 2)
> make[4]: *** [arch/x86] Fehler 2 (Error 2)
> make[4]: *** Warte auf noch nicht beendete Prozesse... (Waiting for
> unfinished jobs...)
>
> I am not sure if this is a problem of Debian's binutils snapshot from
> binutils-2_21-branch (Debian-version: 2.21.0.20110302-1) from sid/i386
> or this is only a problem for x86, but I just want to let you know.
>
> FYI: The previous binutils (2.21.0.20110216-2) works fine.
>
> I have tried with reverting the last two changes to
> arch/x86/kernel/entry_32.S in linux-next:
>
> "x86: Use {push,pop}_cfi in more places" (see [1])
> "x86, asm: Cleanup unnecssary macros in asm-offsets.c" (see [2])
>
> Reverting both or [1] or [2] breaks with Debians as (2.21.0.20110302-1).
>
> BTW, [3] has a complete GIT history for the above file.
>
> So, I am unsure from where the problem exactly aroses.
> If this a known issue (and a fix around) or rings a bell to you, let
> me and others know.
>
> Thanks in advance.
>
> Regards,
> - Sedat -
>
> [1] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=60cf637a13932a4750da6746efd0199e8a4c341b
>
> [2] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=7bf04be8f48ceeeffa5b5a79734d6d6e0d59e5f8
>
> [3] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=arch/x86/kernel/entry_32.S;h=2878821cb8c1da1d7147b26271114fa9546afe03;hb=HEAD
>
Just FYI (for the "dropped" MLs while finding the "brain bug"):
Finally, with the help of x86 folks and H.J. Lu a fix for the
linux-kernel can now be found in [1].
Commits [2] and [3] from binutils master GIT helped to dig deeper into
the right places.
So I would appreciated both to be backported to binutils-2_21-branch GIT.
@Matthias:
If you like you can use the two backported patches (see file
attachments) for a next binutils upload to Debian/sid.
As usually (and you demanded once from me) I dropped any ChangeLog
entries from the code, but kept the history in the commit-text. Also,
I documented my changes.
So the patches should cleanly apply.
Thanks.
- Sedat -
[1] https://patchwork.kernel.org/patch/621001/
[2] http://sourceware.org/git/?p=binutils.git;a=commit;h=b9521fc0be7945fc842ce1197e241a023378125d
[3] http://sourceware.org/git/?p=binutils.git;a=commit;h=cbd141bb69f791de7ea1581abe7afb34f0c61288
[-- Attachment #2: 0001-Mention-symbol-name-in-non-constant-.size-expression.patch --]
[-- Type: text/plain, Size: 3085 bytes --]
From 3708bdd06792e812acd9da711b51482c0b4b2797 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 8 Mar 2011 14:59:35 +0100
Subject: [PATCH 1/2] Mention symbol name in non-constant .size expression.
gas/
2011-03-05 H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c (elf_frob_symbol): Mention symbol name in
non-constant .size expression.
gas/testsuite/
2011-03-05 H.J. Lu <hongjiu.lu@intel.com>
* gas/elf/bad-size.err: Updated.
Conflicts:
gas/ChangeLog
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/bad-size.err
2011-03-08 Sedat Dilek <sedat.dilek@gmail.com>
* Cherry-picked from commit b9521fc0be7945fc842ce1197e241a023378125d
* Drop changes in gas/ChangeLog and gas/testsuite/ChangeLog
---
gas/config/obj-elf.c | 48 ++++++++++++++++++++++++++++++++---
gas/testsuite/gas/elf/bad-size.err | 2 +
2 files changed, 45 insertions(+), 5 deletions(-)
create mode 100644 gas/testsuite/gas/elf/bad-size.err
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 969a509..d43409a 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1879,6 +1879,7 @@ void
elf_frob_symbol (symbolS *symp, int *puntp)
{
struct elf_obj_sy *sy_obj;
+ expressionS *size;
#ifdef NEED_ECOFF_DEBUG
if (ECOFF_DEBUGGING)
@@ -1887,13 +1888,50 @@ elf_frob_symbol (symbolS *symp, int *puntp)
sy_obj = symbol_get_obj (symp);
- if (sy_obj->size != NULL)
+ size = sy_obj->size;
+ if (size != NULL)
{
- if (resolve_expression (sy_obj->size)
- && sy_obj->size->X_op == O_constant)
- S_SET_SIZE (symp, sy_obj->size->X_add_number);
+ if (resolve_expression (size)
+ && size->X_op == O_constant)
+ S_SET_SIZE (symp, size->X_add_number);
else
- as_bad (_(".size expression does not evaluate to a constant"));
+ {
+ const char *op_name = NULL;
+ const char *add_name = NULL;
+
+ if (size->X_op == O_subtract)
+ {
+ op_name = S_GET_NAME (size->X_op_symbol);
+ add_name = S_GET_NAME (size->X_add_symbol);
+ if (strcmp (op_name, FAKE_LABEL_NAME) == 0)
+ op_name = NULL;
+ if (strcmp (add_name, FAKE_LABEL_NAME) == 0)
+ add_name = NULL;
+
+ if (op_name && add_name)
+ as_bad (_(".size expression with symbols `%s' and `%s' "
+ "does not evaluate to a constant"),
+ op_name, add_name);
+ else
+ {
+ const char *name;
+
+ if (op_name)
+ name = op_name;
+ else if (add_name)
+ name = add_name;
+ else
+ name = NULL;
+
+ if (name)
+ as_bad (_(".size expression with symbol `%s' "
+ "does not evaluate to a constant"), name);
+ }
+ }
+
+ if (!op_name && !add_name)
+ as_bad (_(".size expression does not evaluate to a constant"));
+ }
free (sy_obj->size);
sy_obj->size = NULL;
}
diff --git a/gas/testsuite/gas/elf/bad-size.err b/gas/testsuite/gas/elf/bad-size.err
new file mode 100644
index 0000000..a5bfc31
--- /dev/null
+++ b/gas/testsuite/gas/elf/bad-size.err
@@ -0,0 +1,2 @@
+.*bad-size\.s: Assembler messages:
+.*bad-size\.s:6: Error:.*`_test_nop'.*
--
1.7.4.1
[-- Attachment #3: 0002-Revert-the-last-change-on-gas-elf-bad-size.err.patch --]
[-- Type: text/plain, Size: 947 bytes --]
From eff5315213e5ad4cf255e3ec536f629a015100ee Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 8 Mar 2011 15:05:45 +0100
Subject: [PATCH 2/2] Revert the last change on gas/elf/bad-size.err.
2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
* gas/elf/bad-size.err: Revert the last change.
Conflicts:
gas/testsuite/ChangeLog
2011-03-08 Sedat Dilek <sedat.dilek@gmail.com>
* Cherry-picked from commit cbd141bb69f791de7ea1581abe7afb34f0c61288
* Drop changes in gas/testsuite/ChangeLog
---
gas/testsuite/gas/elf/bad-size.err | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gas/testsuite/gas/elf/bad-size.err b/gas/testsuite/gas/elf/bad-size.err
index a5bfc31..5e01ef2 100644
--- a/gas/testsuite/gas/elf/bad-size.err
+++ b/gas/testsuite/gas/elf/bad-size.err
@@ -1,2 +1,2 @@
.*bad-size\.s: Assembler messages:
-.*bad-size\.s:6: Error:.*`_test_nop'.*
+.*bad-size\.s:6: Error: .*
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-09 11:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 10:44 linux-next: Tree for March 8 (BROKEN: arch/x86/kernel/entry_32.S? Debian's binutils/as?) Sedat Dilek
2011-03-08 12:44 ` Sedat Dilek
2011-03-08 14:55 ` H.J. Lu
2011-03-08 15:28 ` Sedat Dilek
2011-03-08 15:42 ` Sedat Dilek
2011-03-09 11:54 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).