Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ppe42-binutils
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenPOWER Firmware
ppe42-binutils
Commits
48b125d2
Commit
48b125d2
authored
Feb 15, 2017
by
Doug Gilbert
Committed by
GitHub
Feb 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from dgilbert999/binutils-2_24-ppe42
Code clean up to satisfy gcc version 6
parents
5b161fc3
65f124c6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
17 deletions
+42
-17
bfd/bfd-in.h
bfd/bfd-in.h
+1
-1
bfd/bfd-in2.h
bfd/bfd-in2.h
+27
-4
bfd/dwarf2.c
bfd/dwarf2.c
+2
-2
bfd/elf64-ppc.c
bfd/elf64-ppc.c
+6
-4
bfd/libbfd.c
bfd/libbfd.c
+1
-1
binutils/dwarf.c
binutils/dwarf.c
+1
-1
gas/config/tc-ppc.c
gas/config/tc-ppc.c
+1
-1
gas/read.c
gas/read.c
+1
-1
gas/write.c
gas/write.c
+1
-1
include/opcode/ppc.h
include/opcode/ppc.h
+1
-1
No files found.
bfd/bfd-in.h
View file @
48b125d2
...
...
@@ -272,7 +272,7 @@ alent;
/* Object and core file sections. */
#define align_power(addr, align) \
(((addr) + ((bfd_vma) 1 << (align)) - 1) & (
(bfd_vma) -1 << (align
)))
(((addr) + ((bfd_vma) 1 << (align)) - 1) & (
-((bfd_vma) 1 << (align)
)))
typedef
struct
bfd_section
*
sec_ptr
;
...
...
bfd/bfd-in2.h
View file @
48b125d2
...
...
@@ -279,7 +279,7 @@ alent;
/* Object and core file sections. */
#define align_power(addr, align) \
(((addr) + ((bfd_vma) 1 << (align)) - 1) & (
(bfd_vma) -1 << (align
)))
(((addr) + ((bfd_vma) 1 << (align)) - 1) & (
-((bfd_vma) 1 << (align)
)))
typedef
struct
bfd_section
*
sec_ptr
;
...
...
@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
...
...
@@ -1594,6 +1591,32 @@ struct relax_table {
int
size
;
};
/* Note: the following are provided as inline functions rather than macros
because not all callers use the return value. A macro implementation
would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
compilers will complain about comma expressions that have no effect. */
static
inline
bfd_boolean
bfd_set_section_userdata
(
bfd
*
abfd
ATTRIBUTE_UNUSED
,
asection
*
ptr
,
void
*
val
)
{
ptr
->
userdata
=
val
;
return
TRUE
;
}
static
inline
bfd_boolean
bfd_set_section_vma
(
bfd
*
abfd
ATTRIBUTE_UNUSED
,
asection
*
ptr
,
bfd_vma
val
)
{
ptr
->
vma
=
ptr
->
lma
=
val
;
ptr
->
user_set_vma
=
TRUE
;
return
TRUE
;
}
static
inline
bfd_boolean
bfd_set_section_alignment
(
bfd
*
abfd
ATTRIBUTE_UNUSED
,
asection
*
ptr
,
unsigned
int
val
)
{
ptr
->
alignment_power
=
val
;
return
TRUE
;
}
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
these sections. */
...
...
bfd/dwarf2.c
View file @
48b125d2
...
...
@@ -3074,8 +3074,8 @@ place_sections (bfd *abfd, struct dwarf2_debug *stash)
/* Align the new address to the current section
alignment. */
last_vma
=
((
last_vma
+
~
(
(
bfd_vma
)
-
1
<<
sect
->
alignment_power
))
&
(
(
bfd_vma
)
-
1
<<
sect
->
alignment_power
));
+
~
(
-
((
bfd_vma
)
1
<<
sect
->
alignment_power
)
))
&
(
-
((
bfd_vma
)
1
<<
sect
->
alignment_power
)
));
sect
->
vma
=
last_vma
;
last_vma
+=
sect
->
vma
+
sz
;
}
...
...
bfd/elf64-ppc.c
View file @
48b125d2
...
...
@@ -12253,8 +12253,9 @@ ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size,
stub_sec != NULL;
stub_sec = stub_sec->next)
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
stub_sec->size = ((stub_sec->size + (1 << htab->plt_stub_align) - 1)
& (-1 << htab->plt_stub_align));
stub_sec->size = ((stub_sec->size
+ (1 << htab->plt_stub_align) - 1)
& -(1 << htab->plt_stub_align));
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
...
...
@@ -12721,8 +12722,9 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
stub_sec != NULL;
stub_sec = stub_sec->next)
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
stub_sec->size = ((stub_sec->size + (1 << htab->plt_stub_align) - 1)
& (-1 << htab->plt_stub_align));
stub_sec->size = ((stub_sec->size
+ (1 << htab->plt_stub_align) - 1)
& -(1 << htab->plt_stub_align));
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
...
...
bfd/libbfd.c
View file @
48b125d2
...
...
@@ -1102,7 +1102,7 @@ read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
}
while
(
byte
&
0x80
);
if
(
shift
<
8
*
sizeof
(
result
)
&&
(
byte
&
0x40
))
result
|=
(((
bfd_vma
)
-
1
)
<<
shift
);
result
|=
-
((
bfd_vma
)
1
<<
shift
);
*
bytes_read_ptr
=
num_read
;
return
result
;
}
...
...
binutils/dwarf.c
View file @
48b125d2
...
...
@@ -263,7 +263,7 @@ read_leb128 (unsigned char *data,
*
length_return
=
num_read
;
if
(
sign
&&
(
shift
<
8
*
sizeof
(
result
))
&&
(
byte
&
0x40
))
result
|=
-
1L
<<
shift
;
result
|=
-
1
U
L
<<
shift
;
return
result
;
}
...
...
gas/config/tc-ppc.c
View file @
48b125d2
...
...
@@ -1482,7 +1482,7 @@ insn_validate (const struct powerpc_opcode *op)
else
{
const
struct
powerpc_operand
*
operand
=
&
powerpc_operands
[
*
o
];
if
(
operand
->
shift
!=
PPC_OPSHIFT_INV
)
if
(
operand
->
shift
!=
(
int
)
PPC_OPSHIFT_INV
)
{
unsigned
long
mask
;
...
...
gas/read.c
View file @
48b125d2
...
...
@@ -5019,7 +5019,7 @@ output_big_sleb128 (char *p, LITTLENUM_TYPE *bignum, int size)
{
/* Sign-extend VAL. */
if
(
val
&
(
1
<<
(
loaded
-
1
)))
val
|=
~
0
<<
loaded
;
val
|=
-
1U
<<
loaded
;
if
(
orig
)
*
p
=
val
&
0x7f
;
p
++
;
...
...
gas/write.c
View file @
48b125d2
...
...
@@ -2292,7 +2292,7 @@ relax_align (register relax_addressT address, /* Address now. */
relax_addressT
mask
;
relax_addressT
new_address
;
mask
=
~
((
~
0
)
<<
alignment
);
mask
=
~
((
-
1U
)
<<
alignment
);
new_address
=
(
address
+
mask
)
&
(
~
mask
);
#ifdef LINKER_RELAXING_SHRINKS_ONLY
if
(
linkrelax
)
...
...
include/opcode/ppc.h
View file @
48b125d2
...
...
@@ -281,7 +281,7 @@ extern const unsigned int num_powerpc_operands;
/* Use with the shift field of a struct powerpc_operand to indicate
that BITM and SHIFT cannot be used to determine where the operand
goes in the insn. */
#define PPC_OPSHIFT_INV (-1 << 31)
#define PPC_OPSHIFT_INV (-1
U
<< 31)
/* Values defined for the flags field of a struct powerpc_operand. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment