This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 5523
  Confusing warning: "expression dangerous with linker stubs" Last modified: 2008-05-30 14:20:41
     Query page      Enter new bug
Bug#: 5523   Hardware:   Reporter: Joerg Wunsch <j@uriah.heep.sax.de>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: unassigned@sources.redhat.com   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
pr5523.tc-avr.c.patch Remove the warning patch 2008-01-07 16:44 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 5523 depends on: Show dependency tree
Show dependency graph
Bug 5523 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2007-12-27 19:25
This warning is emitted in line 648 of file gas/config/tc-avr.c.

This warning has been confusing a lot of users in the past, because it is
ultimately generated for legitimate assembly code generated by GCC as
part of jump tables resulting out of a larger switch statement.

Discussion with the author of the atmega256x patch, Björn Haase, resulted
in an agreement that the warning should just be removed.  There is indeed
a minimal danger that a switch statement could cross an 128 KiB boundary
where a linker stub could suddenly be placed within the table, but as the
assembler cannot reliably detect this situation at all, it confuses more
people with legitimate code (not crossing a 128 KiB boundary) than it
would be really able to help out those who are in danger.  In the end, the
users are told to ignore the warning, so it doesn't do any good at all.  In
addition, Björn pointed out that it could only detect part of the problem
but is not able to cover all possible dangerous cases, because some code
might hide dangerous operations between other assembly code that is not
covered by the warning.

If at all, this warning needs to be emitted by GCC itself whenever it
generates the possibly dangerous code.

------- Additional Comment #1 From Nick Clifton 2008-01-07 16:44 -------
Created an attachment (id=2177)
Remove the warning

------- Additional Comment #2 From Nick Clifton 2008-01-07 16:45 -------
Hi Joerg,

  Please could you try out the uploaded patch and let me know if it resolves the
problem for you ?

  Also - would it be possible for you to supply a small assembler source file
that demonstrates this problem ?  This could be turned in a gas test case to
make sure that the problem remains fixed.

Cheers
  Nick
 

------- Additional Comment #3 From Andy Hutchinson 2008-05-29 22:38 -------
I applied this patch to Binutils-2.18.50

I ran full avr gcc testsuite and there were no regressions. Importantly, it
removed all the failures caused by the warning message removed by this patch.

So its get my vote!


------- Additional Comment #4 From Nick Clifton 2008-05-30 14:20 -------
Hi Guys,

  I have checked the patch in.

Cheers
  Nick

gas/ChangeLog
	PR 5523
	* config/tc-avr.c (avr_ldi_expression): Do not warn about unknown
	relocs here.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In