diff options
author | Roland McGrath <mcgrathr@google.com> | 2018-08-03 14:38:20 -0700 |
---|---|---|
committer | Roland McGrath <mcgrathr@google.com> | 2018-08-03 14:39:53 -0700 |
commit | bc893c8e469cd9fb4f91b8eb873b405d52756967 (patch) | |
tree | fcb90509c4938d8ae49154ba7a828aaec0e67b8e /gold | |
parent | 75b342fea3bc84d11346dc940830abf7724f75ef (diff) | |
download | gdb-users/roland/2.31/gold-narrowing-switch.zip gdb-users/roland/2.31/gold-narrowing-switch.tar.gz gdb-users/roland/2.31/gold-narrowing-switch.tar.bz2 |
[gold] Fix integer narrowing in switchusers/roland/2.31/gold-narrowing-switch
gold/
* target.h (Sized_target::record_gnu_property): Use unsigned int
for second argument.
* x86_64.cc (Target_x86_64<size>::record_gnu_property): Likewise.
(cherry picked from commit ccaf6a01bae457aba3a3f6baf1239bb55bc189a4)
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/target.h | 3 | ||||
-rw-r--r-- | gold/x86_64.cc | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 18af5e6..e5cd5fa 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2018-08-03 Roland McGrath <mcgrathr@google.com> + + * target.h (Sized_target::record_gnu_property): Use unsigned int + for second argument. + * x86_64.cc (Target_x86_64<size>::record_gnu_property): Likewise. + 2018-07-18 Nick Clifton <nickc@redhat.com> 2.31.1 Release point. diff --git a/gold/target.h b/gold/target.h index bb31206..00a1f98 100644 --- a/gold/target.h +++ b/gold/target.h @@ -1147,7 +1147,8 @@ class Sized_target : public Target // Record a target-specific program property in the .note.gnu.property // section. virtual void - record_gnu_property(int, int, size_t, const unsigned char*, const Object*) + record_gnu_property(int, unsigned int, size_t, const unsigned char*, + const Object*) { } // Merge the target-specific program properties from the current object. diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 27f273d..36c2c27 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -1307,7 +1307,8 @@ class Target_x86_64 : public Sized_target<size, false> // Record a target-specific program property in the .note.gnu.property // section. void - record_gnu_property(int, int, size_t, const unsigned char*, const Object*); + record_gnu_property(int, unsigned int, size_t, const unsigned char*, + const Object*); // Merge the target-specific program properties from the current object. void @@ -1579,7 +1580,7 @@ Target_x86_64<size>::rela_irelative_section(Layout* layout) template<int size> void Target_x86_64<size>::record_gnu_property( - int, int pr_type, + int, unsigned int pr_type, size_t pr_datasz, const unsigned char* pr_data, const Object* object) { |