[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] automation/eclair: add a deviation for MISRA C:2012 Rule 8.6
commit 83e9e305103ef00ba3b546657d47c4aa85899cff Author: Federico Serafini <federico.serafini@xxxxxxxxxxx> AuthorDate: Fri Nov 17 18:16:34 2023 -0800 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Fri Nov 17 18:16:34 2023 -0800 automation/eclair: add a deviation for MISRA C:2012 Rule 8.6 Update ECLAIR configuration to take into account the search procedure adopted by Unix linkers. Update deviations.rst accordingly and tag Rule 8.6 as "clean". Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- automation/eclair_analysis/ECLAIR/deviations.ecl | 11 +++++++++++ automation/eclair_analysis/ECLAIR/tagging.ecl | 2 +- docs/misra/deviations.rst | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index b7c6d85fbf..5b7cf4c947 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -172,6 +172,17 @@ definition is compiled-out or optimized-out by the compiler)" -config=MC3R1.R8.6,reports+={deliberate, "first_area(^.*has no definition$)"} -doc_end +-doc_begin="The search procedure for Unix linkers is well defined, see ld(1) +manual: \"The linker will search an archive only once, at the location where it +is specified on the command line. If the archive defines a symbol which was +undefined in some object which appeared before the archive on the command line, +the linker will include the appropriate file(s) from the archive\". +In Xen, thanks to the order in which file names appear in the build commands, +if arch-specific definitions are present, they get always linked in before +searching in the lib.a archive resulting from xen/lib." +-config=MC3R1.R8.6,declarations+={deliberate, "loc(file(^xen/lib/.*$))"} +-doc_end + -doc_begin="The gnu_inline attribute without static is deliberately allowed." -config=MC3R1.R8.10,declarations+={deliberate,"property(gnu_inline)"} -doc_end diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/eclair_analysis/ECLAIR/tagging.ecl index e82277fea3..d5d3bff396 100644 --- a/automation/eclair_analysis/ECLAIR/tagging.ecl +++ b/automation/eclair_analysis/ECLAIR/tagging.ecl @@ -30,7 +30,7 @@ -doc_begin="Clean guidelines: new violations for these guidelines are not accepted." --service_selector={clean_guidelines_common,"MC3R1.D1.1||MC3R1.D2.1||MC3R1.D4.11||MC3R1.D4.14||MC3R1.R1.1||MC3R1.R1.3||MC3R1.R1.4||MC3R1.R2.2||MC3R1.R3.1||MC3R1.R3.2||MC3R1.R4.1||MC3R1.R4.2||MC3R1.R5.1||MC3R1.R5.2||MC3R1.R5.4||MC3R1.R6.1||MC3R1.R6.2||MC3R1.R7.1||MC3R1.R8.1||MC3R1.R8.5||MC3R1.R8.8||MC3R1.R8.10||MC3R1.R8.12||MC3R1.R8.14||MC3R1.R9.2||MC3R1.R9.4||MC3R1.R9.5||MC3R1.R12.5||MC3R1.R17.3||MC3R1.R17.4||MC3R1.R17.6||MC3R1.R20.13||MC3R1.R20.14||MC3R1.R21.13||MC3R1.R21.19||MC3R1.R21.21||MC3R1.R22.2||MC3R1.R22.4||MC3R1.R22.5||MC3R1.R22.6" +-service_selector={clean_guidelines_common,"MC3R1.D1.1||MC3R1.D2.1||MC3R1.D4.11||MC3R1.D4.14||MC3R1.R1.1||MC3R1.R1.3||MC3R1.R1.4||MC3R1.R2.2||MC3R1.R3.1||MC3R1.R3.2||MC3R1.R4.1||MC3R1.R4.2||MC3R1.R5.1||MC3R1.R5.2||MC3R1.R5.4||MC3R1.R6.1||MC3R1.R6.2||MC3R1.R7.1||MC3R1.R8.1||MC3R1.R8.5||MC3R1.R8.6||MC3R1.R8.8||MC3R1.R8.10||MC3R1.R8.12||MC3R1.R8.14||MC3R1.R9.2||MC3R1.R9.4||MC3R1.R9.5||MC3R1.R12.5||MC3R1.R17.3||MC3R1.R17.4||MC3R1.R17.6||MC3R1.R20.13||MC3R1.R20.14||MC3R1.R21.13||MC3R1.R21.19||MC3R1.R21.21||MC3R1.R22.2||MC3R1.R22.4||MC3R1.R22.5||MC3R1.R22.6" } -setq=target,getenv("XEN_TARGET_ARCH") diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index b5a46f7f87..95872b40a2 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -153,6 +153,18 @@ Deviations related to MISRA C:2012 Rules: definition is compiled-out or optimized-out by the compiler). - Tagged as `deliberate` in ECLAIR. + * - R8.6 + - The search procedure for Unix linkers is well defined, see ld(1) manual: + "The linker will search an archive only once, at the location where it + is specified on the command line. If the archive defines a symbol which + was undefined in some object which appeared before the archive on the + command line, the linker will include the appropriate file(s) from the + archive". + In Xen, thanks to the order in which file names appear in the build + commands, if arch-specific definitions are present, they get always + linked in before searching in the lib.a archive resulting from xen/lib. + - Tagged as `deliberate` for ECLAIR. + * - R8.10 - The gnu_inline attribute without static is deliberately allowed. - Tagged as `deliberate` for ECLAIR. -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |